summaryrefslogtreecommitdiffstats
path: root/generic/tkbltGrAxis.C
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-10-08 12:00:00 (GMT)
commitdbddfe871076e4a9c10438a8af9c1dfea3b917f6 (patch)
tree8a6b82b70aea8c04445638aeddf2038fe2ad032e /generic/tkbltGrAxis.C
parent9b8c9769c0b7ad4e232550609f8e99d3d5b24f3c (diff)
downloadblt-dbddfe871076e4a9c10438a8af9c1dfea3b917f6.zip
blt-dbddfe871076e4a9c10438a8af9c1dfea3b917f6.tar.gz
blt-dbddfe871076e4a9c10438a8af9c1dfea3b917f6.tar.bz2
Correct display of zero values with -logscale 1
In order to do that, improve the clipping functionality in tkbltGrMisc.C to support infinite coordinates. It also now provides more information with regards to its processing, letting tkbltGrElemLine.C use that same routine instead of duplicade the clipping code.
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 418abbb..d4a2f00 100644
--- a/generic/tkbltGrAxis.C
+++ b/generic/tkbltGrAxis.C
@@ -1123,7 +1123,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] */
@@ -1137,7 +1137,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] */