goffice r2361 - in trunk: . goffice/graph
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: goffice r2361 - in trunk: . goffice/graph
- Date: Tue, 31 Mar 2009 22:49:26 +0000 (UTC)
Author: mortenw
Date: Tue Mar 31 22:49:26 2009
New Revision: 2361
URL: http://svn.gnome.org/viewvc/goffice?rev=2361&view=rev
Log:
2009-03-31 Morten Welinder <terra gnome org>
* goffice/graph/gog-axis.c (map_linear_calc_ticks): When we
determine whether to drop a major tick due to alignment, use a
more stable method.
Modified:
trunk/ChangeLog
trunk/goffice/graph/gog-axis.c
Modified: trunk/goffice/graph/gog-axis.c
==============================================================================
--- trunk/goffice/graph/gog-axis.c (original)
+++ trunk/goffice/graph/gog-axis.c Tue Mar 31 22:49:26 2009
@@ -721,11 +721,11 @@
* after that.
*
* Also due to the rounding, we may have room for one less major
- * tick.
+ * tick. Recomputing maj_N seems to be the most numerically
+ * stable way of figuring that out.
*/
start = go_fake_ceil (minimum / maj_step) * maj_step;
- if (start + maj_N * (maj_step - zero_threshold) > maximum)
- maj_N--;
+ maj_N = go_fake_floor ((maximum - start) / maj_step);
N = (maj_N + 2) * min_N;
ticks = g_new0 (GogAxisTick, N);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]