Index: trunk/SophyaPI/PIext/nomgadapter.cc
===================================================================
--- trunk/SophyaPI/PIext/nomgadapter.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/nomgadapter.cc	(revision 2383)
@@ -66,4 +66,12 @@
 cout << "NObjMgrAdapter::FillFromString() - Error : Not supported for " << s << endl;
  return;
+}
+
+/* --Methode-- */
+string NObjMgrAdapter::GetInfoString(int /*lev*/)
+{
+char buff[128];
+sprintf("Type: %s @ %lx", typeid(*mObj).name(), (long)mObj);
+return(buff);
 }
 
Index: trunk/SophyaPI/PIext/nomgadapter.h
===================================================================
--- trunk/SophyaPI/PIext/nomgadapter.h	(revision 2380)
+++ trunk/SophyaPI/PIext/nomgadapter.h	(revision 2383)
@@ -43,4 +43,7 @@
   virtual void	                FillFromString();
 
+// Returns a string with synthetic information about the object (lev-> Level of details)
+  virtual string                GetInfoString(int lev=0);
+
   virtual void			ReadFits(string const & flnm);
   virtual void			SaveFits(string const & flnm);
Index: trunk/SophyaPI/PIext/nomhistadapter.cc
===================================================================
--- trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/nomhistadapter.cc	(revision 2383)
@@ -46,4 +46,29 @@
 HProf * hp = dynamic_cast<HProf *>(mHis);
 if(hp) return("HProf "); else return("Histo ");
+}
+
+/* --Methode-- */
+string NOMAdapter_Histo::GetInfoString(int lev)
+{
+  char buff[128];
+  string rs;
+  if (lev > 2) {
+    sprintf(buff, "Histo: NBin=%d XMin=%lg XMax=%lg\n", mHis->NBins(), 
+	  mHis->XMin(), mHis->XMax());
+    rs += buff;
+  }
+  sprintf(buff, "Entries= %lg \n", mHis->NEntries());
+  rs += buff;
+  if (lev > 0) {
+    sprintf(buff, "Overflow= %lg \n", mHis->NOver());
+    rs += buff;
+    sprintf(buff, "Underflow= %lg \n", mHis->NUnder());
+    rs += buff;
+  } 
+  sprintf(buff, "Mean= %lg \n", mHis->Mean());
+  rs += buff;
+  sprintf(buff, "Sigma= %lg \n", mHis->Sigma());
+  rs += buff;
+  return rs;
 }
 
Index: trunk/SophyaPI/PIext/nomhistadapter.h
===================================================================
--- trunk/SophyaPI/PIext/nomhistadapter.h	(revision 2380)
+++ trunk/SophyaPI/PIext/nomhistadapter.h	(revision 2383)
@@ -32,4 +32,7 @@
   //  virtual void			SaveFits(string const & flnm);
   virtual void			SavePPF(POutPersist& s, string const & nom);
+
+// Returns a string with synthetic information about the object
+  virtual string                GetInfoString(int lev=0);
 
   virtual void			Print(ostream& os);
Index: trunk/SophyaPI/PIext/pihisto.cc
===================================================================
--- trunk/SophyaPI/PIext/pihisto.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/pihisto.cc	(revision 2383)
@@ -39,4 +39,5 @@
   SetStats();
   SetError();
+  SetStatPosOffset();
   SetName("HistoDrw");
 }
@@ -173,4 +174,9 @@
     else if(opts=="noerr")    SetError(-1);
     else if(opts=="autoerr")  SetError(0);
+    else if(opts.substr(0,11) == "statposoff=") {
+      float xo=0., yo=0.;
+      sscanf(opts.substr(11).c_str(),"%g,%g",&xo, &yo);
+      SetStatPosOffset(xo, yo);
+    }
     else {
       ndec--;
@@ -191,8 +197,10 @@
 PIDrawer::GetOptionsHelpInfo(info);
 info += " ---- PIHisto options help info : \n" ;
-info += "- sta,stat,stats:            activate   statistic display\n";
+info += "  sta,stat,stats:            activate   statistic display\n";
 info += "  nsta,nstat,nostat,nostats: deactivate statistic display\n";
-info += "- err / nerr : draw, do not draw error bars\n";
+info += "  err / nerr : draw, do not draw error bars\n";
 info += "  autoerr : draw error bars if Marker drawing requested OR Profile histo\n";
+info += "  statposoff=OffsetX,OffsetY : Position offset for Stats drawing \n";
+info += "       as a fraction of total size \n";
 return;
 }
@@ -221,10 +229,15 @@
   double cellWidth =  1.1 * (double)g->CalcStringWidth(label);
 
+  double ofpx = spoX*(XMax()-XMin());
+  double ofpy = spoY*(YMax()-YMin());
+  
   double xu, yu, cw;
   // Les limites du cadre
   xu = g->DeltaUCX(XMax(), -cellWidth);
   yu = g->DeltaUCY(YMax(), -cellHeight);
-  g->DrawLine(xu,YMax(),xu,yu);
-  g->DrawLine(xu,yu,XMax(),yu);
+  double recw = XMax()-xu;
+  double rech = YMax()-yu;
+  xu += ofpx;  yu += ofpy;
+  g->DrawBox(xu, yu, recw, rech);
 
   // L'ecriture des labels (attention aux inversions possibles des axes!)
@@ -234,11 +247,12 @@
   cw = (g->isAxeYDirUpDown()) ? -0.15*cH : -1.15*cH;
   yu = g->DeltaUCY(YMax(),cw);
+  xu += ofpx;  yu += ofpy;
   g->DrawString(xu, yu,label1);
-    cw +=  -1.15*cH;
-    yu = g->DeltaUCY(YMax(),cw);
-    g->DrawString(xu, yu,label2);
-      cw +=  -1.15*cH;
-      yu = g->DeltaUCY(YMax(),cw);
-      g->DrawString(xu, yu,label3);
+  cw +=  -1.15*cH;
+  yu = g->DeltaUCY(YMax(),cw);  yu += ofpy;
+  g->DrawString(xu, yu,label2);
+  cw +=  -1.15*cH;
+  yu = g->DeltaUCY(YMax(),cw);  yu += ofpy;
+  g->DrawString(xu, yu,label3);
                        
 }
Index: trunk/SophyaPI/PIext/pihisto.h
===================================================================
--- trunk/SophyaPI/PIext/pihisto.h	(revision 2380)
+++ trunk/SophyaPI/PIext/pihisto.h	(revision 2383)
@@ -15,4 +15,6 @@
   virtual void       UpdateLimits();
   inline  void       SetStats(bool fg=true) {stats=fg;}
+  inline  void       SetStatPosOffset(float ofx=-0.01, float ofy=-0.01) 
+          {spoX=ofx; spoY=ofy; }
   // fg=-1 pas de barre d'erreur, 1=barres d'erreurs,
   // 0=barres d'erreurs automatiques: trace si HProf ou markeur demande
@@ -29,4 +31,5 @@
   bool mAdDO;
   bool stats,error;
+  float spoX, spoY; // Stat pos offset par rapport a position defaut
 };
 
Index: trunk/SophyaPI/PIext/pihisto2d.cc
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/pihisto2d.cc	(revision 2383)
@@ -42,4 +42,5 @@
 UseFrac();
 SetStats();
+ SetStatPosOffset();
 SetName("Histo2DDrw"); 
 // PIHisto2D has specific control tools
@@ -427,10 +428,15 @@
   double cellWidth =  1.1 * (double)g->CalcStringWidth(label);
 
+  double ofpx = spoX*(XMax()-XMin());
+  double ofpy = spoY*(YMax()-YMin());
+
   double xu, yu, cw;
   // Les limites du cadre
   xu = g->DeltaUCX(XMax(), -cellWidth);
   yu = g->DeltaUCY(YMax(), -cellHeight);
-  g->DrawLine(xu,YMax(),xu,yu);
-  g->DrawLine(xu,yu,XMax(),yu);
+  double recw = XMax()-xu;
+  double rech = YMax()-yu;
+  xu += ofpx;  yu += ofpy;
+  g->DrawBox(xu, yu, recw, rech);
 
   // L'ecriture des labels
@@ -439,4 +445,5 @@
   cw = (g->isAxeYDirUpDown()) ? -0.1*cH : -1.1*cH;
   yu = g->DeltaUCY(YMax(),cw);
+  xu += ofpx;  yu += ofpy;
   g->DrawString(xu,yu,label);
 
@@ -524,4 +531,8 @@
              || opts=="nostat" || opts=="nostats") {
       SetStats(false);
+    } else  if(opts.substr(0,11) == "statposoff=") {
+      float xo=0., yo=0.;
+      sscanf(opts.substr(11).c_str(),"%g,%g",&xo, &yo);
+      SetStatPosOffset(xo, yo);
     } else if(opts.substr(0,8)=="h2scale=") {
       unsigned short t=TypScale(); float ls=LogScale();
Index: trunk/SophyaPI/PIext/pihisto2d.h
===================================================================
--- trunk/SophyaPI/PIext/pihisto2d.h	(revision 2380)
+++ trunk/SophyaPI/PIext/pihisto2d.h	(revision 2383)
@@ -42,4 +42,6 @@
   virtual void DrawStats(PIGraphicUC* g);
   inline  void SetStats(bool fg=true) {stats=fg;}
+  inline  void SetStatPosOffset(float ofx=-0.01, float ofy=-0.01) 
+          {spoX=ofx; spoY=ofy; }
 
   //  Methode permettant l'affichage d'une fenetre de controle specialisee 
@@ -77,4 +79,5 @@
   float mHMin,mHMax;
   float mFracMin,mFracMax;
+  float spoX, spoY; // Stat pos offset par rapport a position defaut
 };
 
Index: trunk/SophyaPI/PIext/pintuple.cc
===================================================================
--- trunk/SophyaPI/PIext/pintuple.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/pintuple.cc	(revision 2383)
@@ -46,4 +46,5 @@
   mAdDO = ad; 
   SetStats(true);
+  SetStatPosOffset();
   ConnectPoints(false);
   UseSizeScale(true, 5);
@@ -237,12 +238,16 @@
   // Les labels et leurs longueurs -> largeur de la cellule
   char label[64];
-  sprintf(label, "Nd= %d / Ntot= %d", nok, mNT->NbLines());
+  sprintf(label, "N=%d (/%d)", nok, mNT->NbLines());
   double cellWidth =   1.1 * (double)g->CalcStringWidth(label);
   double xu, yu, cw;
+  double ofpx = spoX*(XMax()-XMin());
+  double ofpy = spoY*(YMax()-YMin());
   // Les limites du cadre
   xu = g->DeltaUCX(XMax(), - cellWidth);
   yu = g->DeltaUCY(YMax(), - cellHeight);
-  g->DrawLine(xu, YMax(), xu, yu);
-  g->DrawLine(xu, yu, XMax(), yu);
+  double recw = XMax()-xu;
+  double rech = YMax()-yu;
+  xu += ofpx;  yu += ofpy;
+  g->DrawBox(xu, yu, recw, rech);
   // L'ecriture des labels (attention aux inversions possibles des axes!)
   cw = (g->isAxeXDirRtoL()) ? -0.05*cellWidth : -0.95*cellWidth;
@@ -250,4 +255,5 @@
   cw = (g->isAxeYDirUpDown()) ? -0.1*cH : -1.1*cH;
   yu = g->DeltaUCY(YMax(),cw);
+  xu += ofpx;  yu += ofpy;
   g->DrawString(xu,yu,label);
 }
@@ -313,4 +319,9 @@
     else if(  opts=="nsta"   || opts=="nstat"
            || opts=="nostat" || opts=="nostats") SetStats(false);
+    else if(opts.substr(0,11) == "statposoff=") {
+      float xo=0., yo=0.;
+      sscanf(opts.substr(11).c_str(),"%g,%g",&xo, &yo);
+      SetStatPosOffset(xo, yo);
+    }
     else if (opts == "connectpoints") ConnectPoints(true);
     else if (opts == "noconnectpoints") ConnectPoints(false);
@@ -323,4 +334,5 @@
       UseSizeScale(true, nbn);
     }
+
     else {
       // Si option non decode
@@ -350,9 +362,11 @@
 info += "  sta,stat,stats:            activate   statistic display\n";
 info += "  nsta,nstat,nostat,nostats: deactivate statistic display\n";
+info += "  statposoff=OffsetX,OffsetY : Position offset for Stats drawing \n";
+info += "      as a fraction of total size \n";
 info += "  connectpoints: The points are connected by a line \n";
 info += "  noconnectpoints (this is the default) \n";
 info += "  colorscale/nocolorscale (Use color scale for weight) \n";
 info += "  sizescale/sizescale=nbins/nosizescale (Use marker size for weight) \n";
-info += "  and usual color/line/marker/... attribute decoding  \n";
+info += "   (and usual color/line/marker/... attribute decoding)  \n";
 return;
 }
Index: trunk/SophyaPI/PIext/pintuple.h
===================================================================
--- trunk/SophyaPI/PIext/pintuple.h	(revision 2380)
+++ trunk/SophyaPI/PIext/pintuple.h	(revision 2383)
@@ -35,4 +35,6 @@
 
   inline  void       SetStats(bool fg=true) { stats = fg; }
+  inline  void       SetStatPosOffset(float ofx=-0.01, float ofy=-0.01) 
+          {spoX=ofx; spoY=ofy; }
 
   virtual void       AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
@@ -56,4 +58,5 @@
   bool stats;               // true -> indication du nb de points
   bool connectPts;          // true -> les points sont relies par une ligne
+  float spoX, spoY; // Stat pos offset par rapport a position defaut
 };
 
Index: trunk/SophyaPI/PIext/pistdimgapp.cc
===================================================================
--- trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 2380)
+++ trunk/SophyaPI/PIext/pistdimgapp.cc	(revision 2383)
@@ -44,4 +44,6 @@
 static void hideInfoWindow(PIStdImgApp* app);
 
+// Pour compter le nombre de display same a la suite
+static int nb_disp_same = 0;
 
 /* ........................................................... */
@@ -628,4 +630,12 @@
   // Les options 
   scd->DecodeOptionString(mDefaultAtt, false);
+  if (nb_disp_same > 0) {
+    vector<string> ostatpos;
+    int spo = nb_disp_same%4;
+    if (spo == 1) ostatpos.push_back("statposoff=-0.01,-0.26");
+    else if (spo == 2)  ostatpos.push_back("statposoff=-0.36,-0.01");
+    else  ostatpos.push_back("statposoff=-0.36,-0.26");
+    scd->DecodeOptionString(ostatpos, true);
+  }
   scd->DecodeOptionString(opts, true);
 
@@ -720,4 +730,13 @@
   // Les options 
   dr3->DecodeOptionString(mDefaultAtt, false);
+  if (nb_disp_same > 1) {
+    vector<string> ostatpos;
+    int spo = nb_disp_same%4;
+    if (spo == 1) ostatpos.push_back("statposoff=-0.01,-0.26");
+    else if (spo == 2)  ostatpos.push_back("statposoff=-0.36,-0.01");
+    else  ostatpos.push_back("statposoff=-0.36,-0.26");
+    dr3->DecodeOptionString(ostatpos, true);
+  }
+
   dr3->DecodeOptionString(opts, true);
 
@@ -1444,4 +1463,6 @@
 
   //DBG  cerr << " DBG-Parse-B opts.size()=" << opts.size() << endl;
+  if (rc == Disp_Same) nb_disp_same++;
+  else nb_disp_same = 0;
   return (rc);
 }
