[goffice] Fix backplane position when data are nearly all the same. [#684599]
- From: Jean BrÃfort <jbrefort src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Fix backplane position when data are nearly all the same. [#684599]
- Date: Sun, 23 Sep 2012 14:22:18 +0000 (UTC)
commit 732c8a897ac85998a97363ef6472d54d92904df5
Author: Jean Brefort <jean brefort normalesup org>
Date: Sun Sep 23 16:22:00 2012 +0200
Fix backplane position when data are nearly all the same. [#684599]
ChangeLog | 5 +++++
NEWS | 1 +
goffice/graph/gog-axis.c | 2 ++
3 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 0d83ec3..4f41acd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-09-23 Jean Brefort <jean brefort normalesup org>
+
+ * goffice/graph/gog-axis.c (map_linear_auto_bound): fix scale when data
+ differ are nearly identical. [#684599]
+
2012-09-20 Jean Brefort <jean brefort normalesup org>
* plugins/plot_distrib/gog-histogram.c
diff --git a/NEWS b/NEWS
index db55bf2..b4952dd 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Jean:
* New scattered min-max plot type. [#683493]
* Don't crash when no valid data is available for histograms. [#684047]
* Clip histograms to the plot area. [#684195]
+ * Fix backplane position when data are nearly all the same. [#684599]
--------------------------------------------------------------------------
goffice 0.9.6:
diff --git a/goffice/graph/gog-axis.c b/goffice/graph/gog-axis.c
index 5871d7b..42e8d7c 100644
--- a/goffice/graph/gog-axis.c
+++ b/goffice/graph/gog-axis.c
@@ -722,6 +722,8 @@ map_linear_auto_bound (GogAxis *axis, double minimum, double maximum, double *bo
range = fabs (maximum - minimum);
/* handle singletons */
+ if (range > 0. && range / (fabs (minimum) + fabs (maximum)) <= DBL_EPSILON)
+ range = 0.;
if (go_sub_epsilon (range) <= 0.) {
if (maximum > 0)
minimum = 0.;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]