From 6d8680db55c1e9032ba9ec5ba79c344752437a3b Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 11 Oct 2012 13:57:28 +0000 Subject: [PATCH] fix min/max in default case --- Graphics/drawGraph2d.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Graphics/drawGraph2d.cpp b/Graphics/drawGraph2d.cpp index 147424892b..d4b2fef879 100644 --- a/Graphics/drawGraph2d.cpp +++ b/Graphics/drawGraph2d.cpp @@ -479,10 +479,16 @@ static void drawGraph(drawContext *ctx, PView *p, double xleft, double ytop, opt->tmpMin = data->getMin(opt->timeStep); opt->tmpMax = data->getMax(opt->timeStep); } - else{ + else if(opt->abscissaRangeType == PViewOptions::Custom){ + // FIXME: should also compute min/max for reduced abscissa range over all + // steps opt->tmpMin = ymin; opt->tmpMax = ymax; } + else { + opt->tmpMin = data->getMin(); + opt->tmpMax = data->getMax(); + } if(opt->scaleType == PViewOptions::Logarithmic){ opt->tmpMin = log10(opt->tmpMin); -- GitLab