diff --git a/Graphics/drawGraph2d.cpp b/Graphics/drawGraph2d.cpp
index 147424892bd871b36ade1b5f298eda00daf1706f..d4b2fef87908d842f69b50cf429996e6b6673393 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);