summaryrefslogtreecommitdiffstats
path: root/generic/tkbltGrAxis.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2018-10-08 17:58:37 (GMT)
committerGitHub <noreply@github.com>2018-10-08 17:58:37 (GMT)
commit8034ca3a29a1548ffbc9b0cc2e9615ac584c0622 (patch)
tree2b58210d820470ce4885a186f84c7f0f7b765070 /generic/tkbltGrAxis.C
parent2de851266749461bfba1b6e8fb69eeeee79e1e4e (diff)
parentda666bacae2d965070c49ca7affec66a87fa9269 (diff)
downloadblt-8034ca3a29a1548ffbc9b0cc2e9615ac584c0622.zip
blt-8034ca3a29a1548ffbc9b0cc2e9615ac584c0622.tar.gz
blt-8034ca3a29a1548ffbc9b0cc2e9615ac584c0622.tar.bz2
Merge pull request #21 from prs-de/axis-limits
Prevent unreasonable axis limits
Diffstat (limited to 'generic/tkbltGrAxis.C')
-rw-r--r--generic/tkbltGrAxis.C6
1 files changed, 6 insertions, 0 deletions
diff --git a/generic/tkbltGrAxis.C b/generic/tkbltGrAxis.C
index 418abbb..26560d0 100644
--- a/generic/tkbltGrAxis.C
+++ b/generic/tkbltGrAxis.C
@@ -902,6 +902,12 @@ void Axis::fixRange()
(ops->reqMin >= ops->reqMax)) {
ops->reqMin = ops->reqMax = NAN;
}
+ if (ops->reqMin < -DBL_MAX) {
+ ops->reqMin = -DBL_MAX;
+ }
+ if (ops->reqMax > DBL_MAX) {
+ ops->reqMax = DBL_MAX;
+ }
if (ops->logScale) {
if ((!isnan(ops->reqMin)) && (ops->reqMin <= 0.0))
ops->reqMin = NAN;