summaryrefslogtreecommitdiffstats
path: root/generic/tkbltGrAxis.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-10-08 18:57:07 (GMT)
committerGitHub <noreply@github.com>2018-10-08 18:57:07 (GMT)
commit11d2be66bad300683f2a71ec5c1a716a501dde66 (patch)
treece44434092eca69d96b95e38f8e2ae601b3a4a97 /generic/tkbltGrAxis.C
parent243ab6b1c0e547e66a6fafe5795e80bb0761264f (diff)
parentdbddfe871076e4a9c10438a8af9c1dfea3b917f6 (diff)
downloadblt-11d2be66bad300683f2a71ec5c1a716a501dde66.zip
blt-11d2be66bad300683f2a71ec5c1a716a501dde66.tar.gz
blt-11d2be66bad300683f2a71ec5c1a716a501dde66.tar.bz2
Merge pull request #20 from prs-de/log-scale-zerov3.2.12
Correct display of zero values with -logscale 1
Diffstat (limited to 'generic/tkbltGrAxis.C')
-rw-r--r--generic/tkbltGrAxis.C4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tkbltGrAxis.C b/generic/tkbltGrAxis.C
index 26560d0..738acc3 100644
--- a/generic/tkbltGrAxis.C
+++ b/generic/tkbltGrAxis.C
@@ -1129,7 +1129,7 @@ double Axis::invVMap(double y)
double Axis::hMap(double x)
{
AxisOptions* ops = (AxisOptions*)ops_;
- if ((ops->logScale) && (x != 0.0)) {
+ if (ops->logScale) {
x = log10(fabs(x));
}
/* Map graph coordinate to normalized coordinates [0..1] */
@@ -1143,7 +1143,7 @@ double Axis::hMap(double x)
double Axis::vMap(double y)
{
AxisOptions* ops = (AxisOptions*)ops_;
- if ((ops->logScale) && (y != 0.0)) {
+ if (ops->logScale) {
y = log10(fabs(y));
}
/* Map graph coordinate to normalized coordinates [0..1] */