From 33895a7a6dab0ec316220ea103c352167d0bad6e Mon Sep 17 00:00:00 2001 From: David Huynh Date: Thu, 6 May 2010 22:49:19 +0000 Subject: [PATCH] In scatterplot facets, made sure in log/log mode no point falls in the negative quadrants. git-svn-id: http://google-refine.googlecode.com/svn/trunk@615 7d457c2a-affb-35e4-300a-418c747d4874 --- .../metaweb/gridworks/browsing/facets/ScatterplotFacet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/metaweb/gridworks/browsing/facets/ScatterplotFacet.java b/src/main/java/com/metaweb/gridworks/browsing/facets/ScatterplotFacet.java index 8f40356f1..6ea0d96b8 100644 --- a/src/main/java/com/metaweb/gridworks/browsing/facets/ScatterplotFacet.java +++ b/src/main/java/com/metaweb/gridworks/browsing/facets/ScatterplotFacet.java @@ -373,7 +373,7 @@ public class ScatterplotFacet implements Facet { double relative_x = x - min_x; double range_x = max_x - min_x; if (dim_x == ScatterplotFacet.LOG) { - x = Math.log10(relative_x) * l / Math.log10(range_x); + x = Math.log10(relative_x + 1) * l / Math.log10(range_x + 1); } else { x = relative_x * l / range_x; } @@ -381,7 +381,7 @@ public class ScatterplotFacet implements Facet { double relative_y = y - min_y; double range_y = max_y - min_y; if (dim_y == ScatterplotFacet.LOG) { - y = Math.log10(relative_y) * l / Math.log10(range_y); + y = Math.log10(relative_y + 1) * l / Math.log10(range_y + 1); } else { y = relative_y * l / range_y; }