Index: fact/Evidence/GUI.cc
===================================================================
--- fact/Evidence/GUI.cc	(revision 10928)
+++ fact/Evidence/GUI.cc	(revision 10984)
@@ -46,4 +46,6 @@
   if (Format.size() == 1 && Format[0] != 'C') return new EddPlot(Service, Index);
   else return new EddText(Service);
+  
+  
 }
 
@@ -235,5 +237,5 @@
   setAcceptDrops(true);
   setAxisScaleDraw(QwtPlot::xBottom, new EddTimeScale);
-	
+
   // Update time range on plot when axis change	(update() results in paintEvent())
   connect(axisWidget(QwtPlot::xBottom), SIGNAL(scaleDivChanged()), SLOT(update()));
@@ -252,6 +254,8 @@
   Menu->insertAction(Menu->actions().value(1), Action);
   
-  // Maximum number if points in curve (will be increased in Update())
-  SizeLimit = 0;
+  // Set timer to regularly update plot if new data available
+  SingleShot = new QTimer(this);
+  connect(SingleShot, SIGNAL(timeout()), this, SLOT(UpdatePlot()));
+  SingleShot->setSingleShot(true);
 
   // DIM client
@@ -284,5 +288,27 @@
   List.append(N);
 
+  // Request new history buffer
+  const struct EvidenceHistory::Item *R;
+  class EvidenceHistory *Hist;
+
+  if ((Hist = Handler->GetHistory(Name)) != NULL) {
+	double Number=0;
+	while ((R=Hist->Next()) != NULL) {
+	  switch (*(Hist->GetFormat())) {
+    	case 'I':
+		case 'L':  Number = *((int *) R->Data + N.Index);   break;
+    	case 'S':  Number = *((short *) R->Data + N.Index);   break;
+    	case 'F':  Number = *((float *) R->Data + N.Index);   break;
+    	case 'D':  Number = *((double *) R->Data + N.Index);   break;
+    	case 'X':  Number = *((long long *) R->Data + N.Index);   break;
+    	default: break;
+	  }
+	  AddPoint(List.size()-1, R->Time, Number);
+	}
+  }
+  Handler->DropHistory(Name);
   Handler->Subscribe(Name);
+  
+  SingleShot->start(100);
 }
 
@@ -290,44 +316,7 @@
 void EddPlot::Update(QString Name, int Time, QByteArray, QString Format, QString Text) {
 
-  bool DoUpdate = false;
-
-  // Determine which plot item this call belongs to
-  int ItemNo;
-  for (ItemNo=0; ItemNo<List.size(); ItemNo++) if (List[ItemNo].Name == Name) {
-
-	DoUpdate = true;
-
-	// If size limit reached, clear buffer
-    if (List[ItemNo].Signal->dataSize() > SizeLimit) List[ItemNo].Signal->setData(QPolygonF());
-
-	// If buffer empty, request new history buffer
-    if (List[ItemNo].Signal->dataSize() == 0) {
-	  int Count=0;
-	  const struct EvidenceHistory::Item *R;
-	  class EvidenceHistory *Hist;
-
-	  if ((Hist = Handler->GetHistory(List[ItemNo].Name)) != NULL) {
-		double Number=0;
-		while ((R=Hist->Next()) != NULL) {
-		  switch (*(Hist->GetFormat())) {
-    		case 'I':
-			case 'L':  Number = *((int *) R->Data + List[ItemNo].Index);   break;
-    		case 'S':  Number = *((short *) R->Data + List[ItemNo].Index);   break;
-    		case 'F':  Number = *((float *) R->Data + List[ItemNo].Index);   break;
-    		case 'D':  Number = *((double *) R->Data + List[ItemNo].Index);   break;
-    		case 'X':  Number = *((long long *) R->Data + List[ItemNo].Index);   break;
-    		default: break;
-		  }
-		  AddPoint(ItemNo, R->Time, Number);
-		  Count++;
-		}
-
-		// Local buffer at least twice as large as longest history
-		if (SizeLimit < 2*Count) SizeLimit = 2*Count;
-	  }
-	  Handler->DropHistory(List[ItemNo].Name);
-	}
-
- 	// Append data only if service available
+  for (int ItemNo=0; ItemNo<List.size(); ItemNo++) if (List[ItemNo].Name == Name) {
+
+ 	// Append data if service available
 	if (SetStatus(this, Name, Time, Format)) {
 	  QString Txt = Text;
@@ -335,7 +324,7 @@
       AddPoint(ItemNo, Time, atof(Txt.toAscii().data()));
 	}
-  }
-
-  if (DoUpdate) UpdatePlot();
+
+	NewData = true;
+  }
 }
 
@@ -412,4 +401,5 @@
   setCanvasBackground(EddPlotBackgroundColor);
   setMargin(15);
+  NewData = false;
 
   // Plot navigation
@@ -460,8 +450,15 @@
   Menu->addAction("Single trace", this, SLOT(MenuSingleTrace()));
   Menu->addSeparator();
+  Menu->addAction("Set update rate", this, SLOT(MenuSetUpdateRate()));  
+  Menu->addSeparator();
   Menu->addAction("Save as ASCII", this, SLOT(MenuSaveASCII()));
   Menu->addAction("Save plot", this, SLOT(MenuSave()));
   Menu->addAction("Print plot", this, SLOT(MenuPrint()));
   Menu->addAction("Plot help", this, SLOT(MenuPlotHelp()));
+  
+  // Set timer to regularly update plot if new data available
+  Timer = new QTimer(this);
+  connect(Timer, SIGNAL(timeout()), this, SLOT(UpdatePlot()));
+  Timer->start(2000);
 }
 
@@ -527,4 +524,8 @@
   Symbol.setStyle(QwtSymbol::Ellipse);
   Symbol.setSize(4);
+
+  // Only update if called by timer if new data is available
+  if (sender() == Timer && !NewData) return;
+  NewData = false;
 
   // Select engine for linear or logarithmic scale
@@ -560,5 +561,5 @@
       }  
     }
- 
+
     // Plot data
     Items[ItemNo].Signal->setData(Items[ItemNo].x.data(), y, DataPoints);
@@ -716,4 +717,15 @@
   }
   UpdatePlot();
+}
+
+// Set maximum update rate of plot
+void EddBasePlot::MenuSetUpdateRate() {
+
+  bool OK;
+  double Rate;
+  
+  Rate = QInputDialog::getDouble(this, "Edd Request",
+    "Minimum period between plot updates (sec)", (double) Timer->interval()/1000, 0, std::numeric_limits<double>::max(), 2, &OK);
+  if (OK) Timer->setInterval(Rate*1000);
 }
 
Index: fact/Evidence/GUI.h
===================================================================
--- fact/Evidence/GUI.h	(revision 10928)
+++ fact/Evidence/GUI.h	(revision 10984)
@@ -22,6 +22,7 @@
 #include <qwt_color_map.h>
 
-#include <limits.h>
+#include <limits>
 #include <float.h>
+#include <limits>
 
 #include "dic.hxx"
@@ -72,4 +73,6 @@
     ~EddBasePlot();
 
+	QTimer *Timer;
+	bool NewData;
 	QwtPlotCurve *NewCurve(QwtText);
 	void ClearCurve(unsigned int);
@@ -86,4 +89,5 @@
 	void contextMenuEvent(QContextMenuEvent *);
     void MenuSingleTrace();        
+    void MenuSetUpdateRate();        
     void MenuZoomOut();
     void MenuSaveASCII();
@@ -172,5 +176,5 @@
   private:
 	QwtLegend *Legend;
-	int SizeLimit;
+	QTimer *SingleShot;
 
     void dragEnterEvent(QDragEnterEvent *);
