From 032cd3132f9395f05ee49fd75ffda4df6d285e28 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Mon, 27 Feb 2017 13:23:35 +0100 Subject: [PATCH] catch nan in log plot range --- pub/plot/axis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pub/plot/axis.cpp b/pub/plot/axis.cpp index 82dfe64c..8cb3840f 100644 --- a/pub/plot/axis.cpp +++ b/pub/plot/axis.cpp @@ -368,7 +368,7 @@ void CAxis::calc_ticks(vector<double>& Tacks, int* ntpt, double* ticklim) const double rlgmin = log10(inf); double rlgmax = log10(sup); double rlgrel = rlgmax - rlgmin; - if (rlgrel > 100) + if (!std::isfinite(rlgrel) || rlgrel > 100) throw S("Excessive log range"); // incr := #decades per tack -- GitLab