Index: /trunk/SophyaPI/PI/parradapter.h
===================================================================
--- /trunk/SophyaPI/PI/parradapter.h	(revision 119)
+++ /trunk/SophyaPI/PI/parradapter.h	(revision 120)
@@ -14,5 +14,5 @@
 public :
                   P1DArrayAdapter(int sz=0) {mSize=sz; } 
-                  ~P1DArrayAdapter();
+  virtual         ~P1DArrayAdapter() { };
  
   virtual float   Value(int i) = 0;
Index: /trunk/SophyaPI/PI/pi3ddrw.cc
===================================================================
--- /trunk/SophyaPI/PI/pi3ddrw.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pi3ddrw.cc	(revision 120)
@@ -152,6 +152,28 @@
 }
 
+
 /* --Methode-- */
 void PIDraw3DWdg::Update3DView()
+{
+  list<int>::iterator it = m3DrIl.begin();
+  if (it == m3DrIl.end())  return;
+#if defined(__GNUC__) && !defined(GCCV28)
+  PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
+#else
+  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
+#endif
+  if (dr3 == NULL)  return;
+  dr3->UpdateLimits();
+  float xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
+  bool vobs;
+  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
+  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
+  Refresh();
+}
+
+
+/* --Methode-- */
+void PIDraw3DWdg::SetDrawers3DView()
 {
   float xc, yc, zc, xo, yo, zo;
@@ -179,5 +201,5 @@
 {
 if (!vfixed)  { 
-  dr3->UpdateSize();
+  dr3->UpdateLimits();
   float xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
   bool vobs;
@@ -269,5 +291,5 @@
   SelPointerShape(PI_ArrowPointer);
   mWGrC->SelForeground(lCol);
-  Update3DView();
+  SetDrawers3DView();
   Refresh();
 }
@@ -305,5 +327,5 @@
 {
   DrawXYZAxes();
-  float rapx = (float)(x-lPx)/XSize();
+  float rapx = (float)(lPx-x)/XSize();
   if (rapx > 0.) rapx = rapx*2.+1;
   else rapx += 1.;
@@ -332,5 +354,5 @@
   SelPointerShape(PI_ArrowPointer);
   mWGrC->SelForeground(lCol);
-  Update3DView();
+  SetDrawers3DView();
   Refresh();
 }
@@ -375,19 +397,5 @@
   PIDrwTools::SetCurrentBaseWdg(this);
   if ( (x > 50) || ( y > 50) ) return; 
-  list<int>::iterator it = m3DrIl.begin();
-  if (it == m3DrIl.end())  return;
-#if defined(__GNUC__) && !defined(GCCV28)
-  PIDrawer3D* dr3 = (PIDrawer3D*)(GetDrawerId(*it));
-#else
-  PIDrawer3D* dr3 = dynamic_cast<PIDrawer3D*>(GetDrawerId(*it));
-#endif
-  if (dr3 == NULL)  return;
-  dr3->UpdateSize();
-  float xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
-  bool vobs;
-  vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  if (vobs) Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
-  else Set3DView(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
-  Refresh();
+  Update3DView();
 }
 
Index: /trunk/SophyaPI/PI/pi3ddrw.h
===================================================================
--- /trunk/SophyaPI/PI/pi3ddrw.h	(revision 119)
+++ /trunk/SophyaPI/PI/pi3ddrw.h	(revision 120)
@@ -57,4 +57,6 @@
                                   float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco);
 
+  virtual void          Update3DView();   // Vue 3-D a partir de Drawer No 1
+
   int                   AddDrawer3D(PIDrawer3D*, bool ad=false);   // Ajoute un Drawer 
 
@@ -75,5 +77,5 @@
 
 protected :
-  virtual void		Update3DView();
+  virtual void		SetDrawers3DView();
   virtual void		DrawXYZAxes();
 
Index: /trunk/SophyaPI/PI/pibwdggen.h
===================================================================
--- /trunk/SophyaPI/PI/pibwdggen.h	(revision 119)
+++ /trunk/SophyaPI/PI/pibwdggen.h	(revision 120)
@@ -92,5 +92,5 @@
                                       PIGrCoord x2, PIGrCoord y2, bool psz=true);
   virtual void       RemoveDrawer(int id);       // Ote un drawer de la liste
-  virtual void       DeleteDrawers();            // Ote et detruit tous les drawers
+  virtual void       DeleteDrawers();            // Ote tous les drawers, delete des drawers ajoute avec ad=true
 // Acces aux drawers 
   virtual int        NbDrawers();
Index: /trunk/SophyaPI/PI/pidrawer.cc
===================================================================
--- /trunk/SophyaPI/PI/pidrawer.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pidrawer.cc	(revision 120)
@@ -64,5 +64,5 @@
 
 void
-PIDrawer::UpdateSize()
+PIDrawer::UpdateLimits()
 {
 // Ne fait rien !
@@ -82,6 +82,6 @@
 PIDrawer::SetColAtt(PIColors fg, PIColors bg)
 {
-  if (fg != PI_NotDefColor) mFCol = fg;
-  if (bg != PI_NotDefColor) mBCol = bg;
+  mFCol = fg;
+  mBCol = bg;
 }
 
@@ -89,5 +89,5 @@
 PIDrawer::SetLineAtt(PILineAtt lat)
 {
-  if (lat != PI_NotDefLineAtt) mLAtt = lat;
+  mLAtt = lat;
 }
 
@@ -95,6 +95,6 @@
 PIDrawer::SetFontAtt(PIFontSize fsz, PIFontAtt fat)
 {
-  if (fsz != PI_NotDefFontSize) mFSz = fsz;
-  if (fat != PI_NotDefFontAtt) mFAtt = fat;
+  mFSz = fsz;
+  mFAtt = fat;
 }
 
@@ -102,6 +102,6 @@
 PIDrawer::SetMarkerAtt(int sz, PIMarker mrk)
 {
-  if (sz >= 0)  mMSz = sz;
-  if (mrk != PI_NotDefMarker) mMrk = mrk;
+  mMSz = sz;
+  mMrk = mrk;
 }
 
@@ -394,4 +394,5 @@
 DrawAxes(g);   // Trace des axes 
 
+SelGraAtt(g);   // DrawAxes change certains attributs graphiques
 DrwElList::iterator it;
 for (it = mElist.begin(); it != mElist.end(); it++)
Index: /trunk/SophyaPI/PI/pidrawer.h
===================================================================
--- /trunk/SophyaPI/PI/pidrawer.h	(revision 119)
+++ /trunk/SophyaPI/PI/pidrawer.h	(revision 120)
@@ -34,5 +34,5 @@
    
   virtual void       Refresh();      // Recalcule les limites et reaffiche
-  virtual void       UpdateSize();   // Calcule et change les limites si non fixees 
+  virtual void       UpdateLimits();   // Calcule et change les limites  
 
   float XMin() const {return xMin;}
Index: /trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- /trunk/SophyaPI/PI/pidrwtools.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pidrwtools.cc	(revision 120)
@@ -7,4 +7,5 @@
 #include "pidrwtools.h"
 #include "piscdrawwdg.h"
+#include "pi3ddrw.h"
 
 
@@ -70,5 +71,5 @@
 mText[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
-cpx = 2*spx;
+cpx = 2*spx+0.25*bsx;
 cpy += spy+bsy; 
 mCkb[0] = new PICheckBox(this,"AxeX-RtoL", 2000, 1.5*bsx, bsy, cpx, cpy);
@@ -79,10 +80,13 @@
 
 cpy += spy+bsy; 
-cpx = 4*spx;;
-mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.5, bsy, cpx, cpy);
-cpx += bsx*1.5+2*spx;
-mBut[1] = new PIButton(this, "Dismiss", 2600,  bsx*1.5, bsy, cpx, cpy);
+cpx = 2.5*spx;;
+mBut[0] = new PIButton(this, "Apply", 2600, bsx, bsy, cpx, cpy);
+cpx += bsx*1.25;
+mBut[1] = new PIButton(this, "Auto", 2700, bsx, bsy, cpx, cpy);
+cpx += bsx*1.25;
+mBut[2] = new PIButton(this, "Dismiss", 2500,  bsx, bsy, cpx, cpy);
 mBut[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
+mBut[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic);
 
 int offy = cpy+bsy+spy*2;
@@ -97,4 +101,5 @@
 
 mOpt[0] = new PIOptMenu(this, "bwt-opt-0", bsx*1.75, bsy, cpx, cpy);
+mOpt[0]->AppendItem("Def.Col", 100);
 mOpt[0]->AppendItem("Black", 101);
 mOpt[0]->AppendItem("White", 102);
@@ -105,10 +110,10 @@
 mOpt[0]->AppendItem("Yellow", 107);
 mOpt[0]->AppendItem("Magenta", 108);
-mOpt[0]->SetValue(101);
+mOpt[0]->SetValue(100);
 mOpt[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
 cpx += spx+1.75*bsx; 
 mOpt[1] = new PIOptMenu(this, "bwt-opt-1", bsx*1.75, bsy, cpx, cpy);
-mOpt[1]->AppendItem("NoColor", 200);
+mOpt[1]->AppendItem("No.CMap", 200);
 mOpt[1]->AppendItem("Grey32", 201);
 mOpt[1]->AppendItem("GreyInv32", 202);
@@ -128,5 +133,5 @@
 cpy += spy+bsy;
 mOpt[2] = new PIOptMenu(this, "bwt-opt-2", bsx*1.75, bsy, cpx, cpy);
-mOpt[2]->AppendItem("Undef-Mrk", 300);
+mOpt[2]->AppendItem("Def.Mrk", 300);
 mOpt[2]->AppendItem("Mrk Dot(.)", 301);
 mOpt[2]->AppendItem("Mrk Plus(+)", 302);
@@ -140,9 +145,10 @@
 mOpt[2]->AppendItem("Mrk Star", 310);
 mOpt[2]->AppendItem("Mrk FStar", 311);
-mOpt[2]->SetValue(301);
+mOpt[2]->SetValue(300);
 mOpt[2]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
 cpx += spx+1.75*bsx; 
 mOpt[3] = new PIOptMenu(this, "bwt-opt-3", bsx*1.75, bsy, cpx, cpy);
+mOpt[3]->AppendItem("Mrk 1 pt", 401);
 mOpt[3]->AppendItem("Mrk 3 pt", 403);
 mOpt[3]->AppendItem("Mrk 5 pt", 405);
@@ -158,13 +164,14 @@
 cpy += spy+bsy;
 mOpt[4] = new PIOptMenu(this, "bwt-opt-4", bsx*1.75, bsy, cpx, cpy);
-mOpt[4]->AppendItem("Normal-Font", 500);
-mOpt[4]->AppendItem("Bold-Font", 501);
-mOpt[4]->AppendItem("Ital-Font", 502);
-mOpt[4]->AppendItem("Small-Font", 510);
-mOpt[4]->AppendItem("Small-Bold-Font", 511);
-mOpt[4]->AppendItem("Small-Ital-Font", 512);
-mOpt[4]->AppendItem("Big-Font", 521);
-mOpt[4]->AppendItem("Big-Bold-Font", 522);
-mOpt[4]->AppendItem("Big-Ital-Font", 523);
+mOpt[4]->AppendItem("Def.Font", 500);
+mOpt[4]->AppendItem("Normal-Font", 511);
+mOpt[4]->AppendItem("Bold", 512);
+mOpt[4]->AppendItem("Ital", 513);
+mOpt[4]->AppendItem("Small-Font", 521);
+mOpt[4]->AppendItem("Small-Bold-Font", 522);
+mOpt[4]->AppendItem("Small-Ital-Font", 523);
+mOpt[4]->AppendItem("Big-Font", 531);
+mOpt[4]->AppendItem("Big-Bold", 532);
+mOpt[4]->AppendItem("Big-Ital", 533);
 mOpt[4]->SetValue(500);
 mOpt[4]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
@@ -172,9 +179,9 @@
 cpx += spx+1.75*bsx; 
 mOpt[5] = new PIOptMenu(this, "bwt-opt-5", bsx*1.75, bsy, cpx, cpy);
-mOpt[5]->AppendItem("Undef-Line", 600);
+mOpt[5]->AppendItem("Def.Line", 600);
 mOpt[5]->AppendItem("Thin-Line", 601);
 mOpt[5]->AppendItem("Normal-Line", 602);
 mOpt[5]->AppendItem("Thick-Line", 603);
-mOpt[5]->SetValue(601);
+mOpt[5]->SetValue(600);
 mOpt[5]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
@@ -182,5 +189,5 @@
 cpy += spy+bsyo;
 bsy = bsyo; spy = spyo;
-mButdr[0] = new PIButton(this, "Dr-", 3501, bsy, bsy, cpx, cpy, PIBtn_ArrowLeft);
+mButdr[0] = new PIButton(this, "-", 3501, bsy, bsy, cpx, cpy);
 cpx += bsy+0.25*spy;
 mNlb = new PILabel(this,"NumDr", bsy, bsy, cpx, cpy);
@@ -188,10 +195,10 @@
 mNDr = 0;
 cpx += bsy+0.25*spy;
-mButdr[1] = new PIButton(this, "Dr+", 3502, bsy, bsy, cpx, cpy, PIBtn_ArrowRight);
+mButdr[1] = new PIButton(this, "+", 3502, bsy, bsy, cpx, cpy);
 mButdr[0]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 mButdr[1]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 mNlb->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
 
-cpx += bsy+3*spx;
+cpx = wszx-1.7*bsx-3*spx;
 mButcf[0] = new PIButton(this, "SetAtt", 2800, bsx*0.85, bsy, cpx, cpy);
 cpx += 0.85*bsx+spx;
@@ -216,4 +223,5 @@
   delete mButcf[i];
   }
+delete mBut[2];
 for(int i=0; i<6; i++)  delete mOpt[i];
 delete mNlb;
@@ -244,10 +252,10 @@
 mCkb[1]->SetState(false);
 
-mOpt[0]->SetValue(101);
+mOpt[0]->SetValue(100);
 mOpt[1]->SetValue(200);
-mOpt[2]->SetValue(301);
+mOpt[2]->SetValue(300);
 mOpt[3]->SetValue(405);
 mOpt[4]->SetValue(500);
-mOpt[5]->SetValue(601);
+mOpt[5]->SetValue(600);
 
 return;
@@ -262,5 +270,6 @@
                      PI_Green, PI_Yellow, PI_Magenta};
 
-PIMarker mrk[11] = { PI_DotMarker, PI_PlusMarker, PI_CrossMarker,
+PIMarker mrk[12] = { PI_NotDefMarker, PI_DotMarker, 
+                     PI_PlusMarker, PI_CrossMarker,
                      PI_CircleMarker, PI_FCircleMarker,
                      PI_BoxMarker, PI_FBoxMarker,
@@ -269,6 +278,6 @@
 PILineAtt line[4] = { PI_NotDefLineAtt, PI_ThinLine, PI_NormalLine, PI_ThickLine};
 
-PIFontAtt fntatt[3] = { PI_RomanFont, PI_BoldFont, PI_ItalicFont };
-PIFontSize fntsz[3] = { PI_NormalSizeFont, PI_SmallSizeFont, PI_BigSizeFont };
+PIFontAtt fntatt[4] = { PI_NotDefFontAtt, PI_RomanFont, PI_BoldFont, PI_ItalicFont };
+PIFontSize fntsz[4] = { PI_NotDefFontSize, PI_NormalSizeFont, PI_SmallSizeFont, PI_BigSizeFont };
 CMapId cmap[11] = {  CMAP_OTHER, CMAP_GREY32, CMAP_GREYINV32,
                      CMAP_COLRJ32, CMAP_COLBR32, CMAP_COLRV32,  
@@ -276,5 +285,5 @@
 
 msg = UserMsg(msg);
-if (msg == 2600)  { Hide(); return; }
+if (msg == 2500)  { Hide(); return; }
 
 if (mCurBW == NULL)   return;
@@ -284,17 +293,21 @@
 int axrl = kAxeDirLtoR;
 int ayud = kAxeDirDownUp;
-int k, kk;
+int k, kk, kkk;
 
 switch (msg) {
 
-  case 2500 :
+  case 2600 :
     sscanf(mText[0]->GetText().c_str(), "%g %g" , &xmin, &xmax);
     sscanf(mText[1]->GetText().c_str(), "%g %g" , &ymin, &ymax);
     if (mCkb[0]->GetState())  axrl = kAxeDirRtoL ;
     if (mCkb[1]->GetState())  ayud = kAxeDirUpDown;
-    printf("--DBG-- %g-%g , %g-%g , %d %d \n", xmin, xmax, ymin, ymax, axrl, ayud);
     if ( mCurBW->kind() == PIScDrawWdg::ClassId ) ((PIScDrawWdg*)mCurBW)-> SetLimits(xmin, xmax, ymin, ymax, axrl, ayud);
     else mCurBW->SetDefaultDrawerLimits(xmin, xmax, ymin, ymax, axrl, ayud);
     mCurBW->Refresh();
+    break;
+
+  case 2700 :
+    if ( mCurBW->kind() == PIScDrawWdg::ClassId ) ((PIScDrawWdg*)mCurBW)->UpdateLimits();
+    else if ( mCurBW->kind() == PIDraw3DWdg::ClassId) ((PIDraw3DWdg*)mCurBW)->Update3DView();
     break;
 
@@ -311,11 +324,11 @@
     drw->SetColMapId(cmap[k]);
     k =  mOpt[2]->GetValue()-300;
-    if ( (k < 0) || (k > 10) )  k = 0;
+    if ( (k < 0) || (k > 11) )  k = 0;
     kk =  mOpt[3]->GetValue()-400;
     if ( (kk < 1) || (kk > 27) )  kk = 1;
     drw->SetMarkerAtt(kk, mrk[k]);
-    k =  ((mOpt[4]->GetValue()-500)/10)%3;
-    kk = (mOpt[4]->GetValue()-500-10*k)%3;
-    drw->SetFontAtt(fntsz[k], fntatt[kk]);
+    k =  (mOpt[4]->GetValue()-500);
+    kk = k/10;   kkk = k%10;
+    drw->SetFontAtt(fntsz[kk], fntatt[kkk]);
     k =  mOpt[5]->GetValue()-600;
     if ( (k < 0) || (k > 3) )  k = 0;
@@ -327,14 +340,15 @@
 
   case 3501 :
-    mNDr--;  
-    if (mNDr < 0)  mNDr = 0;
+  case 3502 :
+    if (msg == 3501) {  mNDr--;   if (mNDr < 0)  mNDr = 0; }
+    else { mNDr++;  if (mNDr >= mCurBW->NbDrawers())  mNDr--; }
     sprintf(strg, "%d", mNDr);
     mNlb->SetLabel(strg);
-    break;
-  case 3502 :
-    mNDr++;  
-    if (mNDr >= mCurBW->NbDrawers())  mNDr--;
-    sprintf(strg, "%d", mNDr);
-    mNlb->SetLabel(strg);
+    mOpt[0]->SetValue(100);
+    mOpt[1]->SetValue(200);
+    mOpt[2]->SetValue(300);
+    mOpt[3]->SetValue(405);
+    mOpt[4]->SetValue(500);
+    mOpt[5]->SetValue(600);
     break;
 
Index: /trunk/SophyaPI/PI/pidrwtools.h
===================================================================
--- /trunk/SophyaPI/PI/pidrwtools.h	(revision 119)
+++ /trunk/SophyaPI/PI/pidrwtools.h	(revision 120)
@@ -35,5 +35,5 @@
 // Pour changer les axes
   PILabel* mLab[2];
-  PIButton* mBut[2];
+  PIButton* mBut[3];
   PIText* mText[2];
   PICheckBox* mCkb[2];
Index: /trunk/SophyaPI/PI/pihisto.cc
===================================================================
--- /trunk/SophyaPI/PI/pihisto.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pihisto.cc	(revision 120)
@@ -17,5 +17,5 @@
 
 void
-PIHisto::UpdateSize()
+PIHisto::UpdateLimits()
 {
   if (!mHisto)  return;  
Index: /trunk/SophyaPI/PI/pihisto.h
===================================================================
--- /trunk/SophyaPI/PI/pihisto.h	(revision 119)
+++ /trunk/SophyaPI/PI/pihisto.h	(revision 120)
@@ -10,5 +10,5 @@
   virtual           ~PIHisto();
   virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
-  virtual void       UpdateSize();
+  virtual void       UpdateLimits();
   virtual void       DrawStats(PIGraphicUC* g);
   inline  Histo*     Histogram() { return(mHisto); }
Index: /trunk/SophyaPI/PI/pihisto2d.cc
===================================================================
--- /trunk/SophyaPI/PI/pihisto2d.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pihisto2d.cc	(revision 120)
@@ -144,5 +144,5 @@
 
 //++
-void PIHisto2D::UpdateSize()
+void PIHisto2D::UpdateLimits()
 //
 //	Definition des tailles graphiques en fonction
Index: /trunk/SophyaPI/PI/pihisto2d.h
===================================================================
--- /trunk/SophyaPI/PI/pihisto2d.h	(revision 119)
+++ /trunk/SophyaPI/PI/pihisto2d.h	(revision 120)
@@ -22,5 +22,5 @@
           void       Print(int lp=0);
   virtual void       Draw(PIGraphicUC* g,float xmin,float ymin,float xmax,float ymax);
-  virtual void       UpdateSize();
+  virtual void       UpdateLimits();
   virtual void       DrawStats(PIGraphicUC* g);
 
Index: /trunk/SophyaPI/PI/pintup3d.cc
===================================================================
--- /trunk/SophyaPI/PI/pintup3d.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pintup3d.cc	(revision 120)
@@ -44,5 +44,5 @@
 
 /* --Methode-- */
-void PINTuple3D::UpdateSize()
+void PINTuple3D::UpdateLimits()
 {
   if (!mNT) return;
@@ -67,7 +67,7 @@
   
   Set3DView((xmin+xmax)/2., (ymin+ymax)/2, (zmin+zmax)/2., 
-            (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.1, 0.3, 0.3);  
-//  printf("PINTuple3D::UpdateSize() : %g-%g  %g-%g  %g-%g (%g) \n", xmin,xmax,ymin,ymax,zmin,zmax,D);
-//  printf("PINTuple3D::UpdateSize() :  %g %g %g << %g %g %g \n", 
+            (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.2, 0.3, 0.3);  
+//  printf("PINTuple3D::UpdateLimits() : %g-%g  %g-%g  %g-%g (%g) \n", xmin,xmax,ymin,ymax,zmin,zmax,D);
+//  printf("PINTuple3D::UpdateLimits() :  %g %g %g << %g %g %g \n", 
 //         (xmin+xmax)/2., (ymin+ymax)/2, (zmin+zmax)*0.5, 
 //         (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.1);
Index: /trunk/SophyaPI/PI/pintup3d.h
===================================================================
--- /trunk/SophyaPI/PI/pintup3d.h	(revision 119)
+++ /trunk/SophyaPI/PI/pintup3d.h	(revision 120)
@@ -11,5 +11,5 @@
   
   virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
-  virtual void       UpdateSize();
+  virtual void       UpdateLimits();
   
           void       SelectXYZ(char* px, char* py, char* pz);
Index: /trunk/SophyaPI/PI/pintuple.cc
===================================================================
--- /trunk/SophyaPI/PI/pintuple.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pintuple.cc	(revision 120)
@@ -40,5 +40,5 @@
 
 /* --Methode-- */
-void PINTuple::UpdateSize()
+void PINTuple::UpdateLimits()
 {
   if (!mNT) return;
Index: /trunk/SophyaPI/PI/pintuple.h
===================================================================
--- /trunk/SophyaPI/PI/pintuple.h	(revision 119)
+++ /trunk/SophyaPI/PI/pintuple.h	(revision 120)
@@ -11,5 +11,5 @@
   
   virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
-  virtual void       UpdateSize();
+  virtual void       UpdateLimits();
   
           void       SelectXY(char* px, char* py);
Index: /trunk/SophyaPI/PI/pipixmapx.cc
===================================================================
--- /trunk/SophyaPI/PI/pipixmapx.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pipixmapx.cc	(revision 120)
@@ -66,5 +66,5 @@
 if (!g) return; 
 if (g->kind() == PI_PSFileGraphics ) {
-    g->DrawPixmap(0, 0, pixmap, nx, ny, cmap);
+    g->DrawPixmap(ofx, ofy, pixmap, nx, ny, cmap);
   /*  Il faut faire quelque chose Sinon ??! */ 
   }
Index: /trunk/SophyaPI/PI/pipodrw.h
===================================================================
--- /trunk/SophyaPI/PI/pipodrw.h	(revision 119)
+++ /trunk/SophyaPI/PI/pipodrw.h	(revision 120)
@@ -3,4 +3,6 @@
 
 #include "pidrawer.h"
+#include "parradapter.h"
+#include "cvector.h"
 
 class PIFuncDrawer : public PIDrawer {
@@ -29,3 +31,18 @@
 };
 
+
+// Adaptateur de vecteurs Peida++ a P1DArrayAdapter
+class POVectorAdapter : public P1DArrayAdapter {
+public :
+                  POVectorAdapter(Vector* v, bool ad=false) :
+                       P1DArrayAdapter(v->NElts())
+                         { aDel = ad; mVec = v; }
+  virtual         ~POVectorAdapter() { if (aDel) delete mVec; }
+  virtual float   Value(int i) { return((*mVec)(i)); }
+
+protected:
+  bool aDel;
+  Vector* mVec;
+
+};
 #endif
Index: /trunk/SophyaPI/PI/piscdrawwdg.cc
===================================================================
--- /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 119)
+++ /trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 120)
@@ -1,4 +1,9 @@
+// Module PI : Peida Interactive     PIScDrawWdg
+// Gestionnaire Drawer-2D  E.Aubourg, R. Ansari  96-98
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
 #include "piscdrawwdg.h"
 #include "pidrwtools.h"
+#include "parradapter.h"
 
 PIScDrawWdg::PIScDrawWdg(PIContainerGen *par, char *nom,
@@ -40,5 +45,5 @@
   if (key == 'O' || key == 'o') { 
     PIDrwTools::SetCurrentBaseWdg(this);
-    PIDrwTools::ShowPIDrwTools();   // Fentre axes et 
+    PIDrwTools::ShowPIDrwTools();   // Fentre axes et options de trace
     }
   }
@@ -73,4 +78,15 @@
 }
   
+void
+PIScDrawWdg::UpdateLimits()
+{
+  if (NbDrawers() < 2)  return;
+  PIDrawer* d = GetDrawer(1);
+  if (d == NULL) return;
+  d->UpdateLimits();
+  SetLimits(d->XMin(), d->XMax(), d->YMin(), d->YMax()); 
+  Refresh();
+  return;  
+}
 
 int 
@@ -79,5 +95,5 @@
   if (d == NULL)  return(-1);
   if (! LimitsFixed() ) {  //  On met a jour les limites 
-    d->UpdateSize();
+    d->UpdateLimits();
     SetLimits(d->XMin(), d->XMax(), d->YMin(), d->YMax());
   }
@@ -225,2 +241,81 @@
 
 
+//  Classe de trace de points/fonctions Y=f(X)
+
+/* --Methode-- */
+PIYfXDrawer::PIYfXDrawer(P1DArrayAdapter* ax, P1DArrayAdapter* ay, bool ad)
+    : PIDrawer()
+{
+  mAdDO = ad;
+  mAx = ax;
+  mAy = ay;
+  if ((mAx == NULL) || (mAy == NULL))  mSz = 0;
+  else mSz = (mAx->Size() < mAy->Size()) ? mAx->Size() :  mAy->Size();
+} 
+
+/* --Methode-- */
+PIYfXDrawer::~PIYfXDrawer()
+{
+  if (mAdDO && mAx)  delete mAx;
+  if (mAdDO && mAy)  delete mAy;
+}
+
+/* --Methode-- */
+void PIYfXDrawer::UpdateLimits()
+{
+  if (mSz <= 0)  return;
+  float xmin, xmax, ymin, ymax;
+  int i=0;
+  xmin = xmax = mAx->Value(i);
+  ymin = ymax = mAy->Value(i);
+  float cv;
+  for(i=0; i<mSz; i++) {
+    cv = mAx->Value(i); 
+    if (cv < xmin)  xmin = cv;
+    if (cv > xmax)  xmax = cv;
+    cv = mAy->Value(i); 
+    if (cv < ymin)  ymin = cv;
+    if (cv > ymax)  ymax = cv;
+  } 
+  float dx, dy;
+  dx = 0.02*(xmax-xmin);
+  dy = 0.02*(ymax-ymin);
+
+  SetLimits(xmin-dx, xmax+dx, ymin-dy, ymax+dy);
+  SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
+}
+
+
+/* --Methode-- */
+void PIYfXDrawer::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
+{
+  float xp,yp;
+  int i;
+
+  if (mSz <= 0)  return;
+
+//  Trace des markers 
+  if ( (mMrk != PI_NotDefMarker) ||  (mLAtt == PI_NotDefLineAtt) ) {
+    for(i=0; i<mSz; i++) {
+      xp = mAx->Value(i);
+      yp = mAy->Value(i);
+      if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
+      g->DrawMarker(xp, yp);
+    }
+  }
+
+  if (mLAtt == PI_NotDefLineAtt)    return;
+
+// Trace des lignes 
+  float xp2, yp2;
+  xp = mAx->Value(0);
+  yp = mAy->Value(0);
+  for(i=1; i<mSz; i++) {
+    xp2 = mAx->Value(i);
+    yp2 = mAy->Value(i);
+    if ( ((xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax)) &&
+         ((xp2 < xmin) || (xp2 > xmax) || (yp2 < ymin) || (yp2 > ymax)) )  continue;
+    g->DrawLine(xp, yp, xp2, yp2);
+    xp = xp2; yp = yp2;
+  }
+}
Index: /trunk/SophyaPI/PI/piscdrawwdg.h
===================================================================
--- /trunk/SophyaPI/PI/piscdrawwdg.h	(revision 119)
+++ /trunk/SophyaPI/PI/piscdrawwdg.h	(revision 120)
@@ -1,2 +1,6 @@
+// Module PI : Peida Interactive     PIScDrawWdg
+// Gestionnaire Drawer-2D  E.Aubourg, R. Ansari  96-98
+// LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA
+
 #ifndef PISCDRAWWDG_H
 #define PISCDRAWWDG_H
@@ -11,4 +15,6 @@
 
 
+// PIScDrawWdg, Gestionnaire de traceur 2D 
+
 class PIScDrawWdg : public PIBaseWdg {
 public:
@@ -21,13 +27,12 @@
   virtual long       kind() {return ClassId; }
   
-  virtual void       Keyboard(int key, PIKeyModifier kmod);
-  virtual void       PasteSelection(unsigned int typ, void *pdata, unsigned int l);
-  
-  void               SetLimits(float xmin, float xmax, float ymin, float ymax, 
+  virtual void       SetLimits(float xmin, float xmax, float ymin, float ymax, 
                                int axrl=kAxeDirSame, int ayud=kAxeDirSame, bool tmp=false);
+  virtual void	     UpdateLimits();  // Calcule et change les limites a partir de Drawer-No-1 
+
   inline void        SetAxesFlags(unsigned int flags=kAxesDflt) { mBDrw->SetAxesFlags(flags); }
 
   int                AddScDrawer(PIDrawer*, bool ad=false);   // Ajoute un Drawer en auto 
-  PIDrawer*          BaseDrawer() { return mBDrw; };
+  inline PIDrawer*   BaseDrawer() { return mBDrw; };
 
   float XMin() const {return mBDrw->XMin();}
@@ -53,4 +58,7 @@
   virtual void       Ptr2Move(int x, int y);
   
+  virtual void       Keyboard(int key, PIKeyModifier kmod);
+  virtual void       PasteSelection(unsigned int typ, void *pdata, unsigned int l);
+  
 protected:
   float xMinS, xMaxS, yMinS, yMaxS; // Sauvegarde pour zoom
@@ -75,4 +83,22 @@
 
 
+// Classe de traceur de points/fonction Y=F(x)
+
+class P1DArrayAdapter;
+class PIYfXDrawer : public PIDrawer {
+public:
+                     PIYfXDrawer(P1DArrayAdapter* ax, P1DArrayAdapter* ay, bool ad);
+  virtual           ~PIYfXDrawer();
+  
+  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
+  virtual void       UpdateLimits();
+  
+       
+protected:
+  P1DArrayAdapter* mAx;
+  P1DArrayAdapter* mAy;
+  int mSz;
+  bool mAdDO;
+};
 
 #endif
Index: /trunk/SophyaPI/PI/pistdwdgx.cc
===================================================================
--- /trunk/SophyaPI/PI/pistdwdgx.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pistdwdgx.cc	(revision 120)
@@ -337,5 +337,4 @@
 int n=0;
 Arg warg[8];
-CreateXtWdg(nom, xmScaleWidgetClass, NULL, sx, sy, px, py);
 XtSetArg(warg[n], XmNshowValue, TRUE); n++;
 XtSetArg(warg[n],XmNnavigationType,XmNONE);  n++;
@@ -354,6 +353,6 @@
 XtSetArg(warg[n], XmNscaleHeight, sy); n++;
 XtSetArg(warg[n], XmNstringDirection, XmSTRING_DIRECTION_R_TO_L); n++;
-
-XtSetValues(XtWdg(), warg, n);
+CreateXtWdg(nom, xmScaleWidgetClass, NULL, sx, sy, px, py, warg, n);
+// XtSetValues(XtWdg(), warg, n);
 SetMinMax(1, 100);
 SetValue(1);
Index: /trunk/SophyaPI/PI/pistlist.cc
===================================================================
--- /trunk/SophyaPI/PI/pistlist.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pistlist.cc	(revision 120)
@@ -37,5 +37,5 @@
 
 /* --Methode-- */
-void PIStarList::UpdateSize()
+void PIStarList::UpdateLimits()
 {
   if (!mStL) return;
@@ -67,6 +67,6 @@
 int msz = mMSz;
 if (msz < 1) msz = 1;
-
-g->SelFont();
+PIMarker mrk = (mMrk != PI_NotDefMarker) ? mMrk : PI_FCircleMarker;
+// g->SelFont();
 nok = 0;  nl2 = mNLev*2-1;
 for (int i=0; i<mStL->NbStars(); i++) {
@@ -80,5 +80,5 @@
   sz = (int)((log10((double)flx/mF0))/mDLgF*(double)nl2-0.01) + msz;
   if (sz < 2)  g->SelMarker(sz, PI_DotMarker);
-  else g->SelMarker(sz, PI_FCircleMarker);
+  else g->SelMarker(sz, mrk);
   g->DrawMarker((double)xp,(double)yp ); 
   if (mDspFV) {  
Index: /trunk/SophyaPI/PI/pistlist.h
===================================================================
--- /trunk/SophyaPI/PI/pistlist.h	(revision 119)
+++ /trunk/SophyaPI/PI/pistlist.h	(revision 120)
@@ -11,5 +11,5 @@
   
   virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
-  virtual void       UpdateSize();
+  virtual void       UpdateLimits();
   
   void               SetFluxLimits(float min=1., float max=-1., int nl=5, bool dispflx=false, bool refr=false);
Index: /trunk/SophyaPI/PI/pisurfdr.cc
===================================================================
--- /trunk/SophyaPI/PI/pisurfdr.cc	(revision 119)
+++ /trunk/SophyaPI/PI/pisurfdr.cc	(revision 120)
@@ -40,5 +40,5 @@
 
 /* --Methode-- */
-void PISurfaceDrawer::UpdateSize()
+void PISurfaceDrawer::UpdateLimits()
 {
   if (mArr == NULL)  return;
@@ -52,12 +52,12 @@
   float D = xmax-xmin;
   if (D < (ymax-ymin))  D = ymax-ymin;
-  D *= 1.5;
+  D *= 1.4;
   
-  Set3DView((xmin+xmax)/2., (ymin+ymax)/2, zmin+(zmax-zmin)*0.4, 
-            (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.1, 0.3, 0.3);  
-//  printf("PISurfaceDrawer::UpdateSize() : %g-%g  %g-%g  %g-%g (%g) \n", xmin,xmax,ymin,ymax,zmin,zmax,D);
-//  printf("PISurfaceDrawer::UpdateSize() :  %g %g %g <<- %g %g %g \n", 
-//         (xmin+xmax)/2., (ymin+ymax)/2, (zmin+zmax)*0.5, 
-//         (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.1 );
+  Set3DView((xmin+xmax)/2., (ymin+ymax)/2, zmin+(zmax-zmin)*0.40, 
+            (xmin+xmax)/2.+D , (ymin+ymax)/2.+2*D , zmin+(zmax-zmin)*0.60, 0.25, 0.25);  
+//  printf("PISurfaceDrawer::UpdateLimits() : %g-%g  %g-%g  %g-%g (%g) \n", xmin,xmax,ymin,ymax,zmin,zmax,D);
+//  printf("PISurfaceDrawer::UpdateLimits() :  %g %g %g <<- %g %g %g \n", 
+//         (xmin+xmax)/2., (ymin+ymax)/2, zmin+(zmax-zmin)*0.40, 
+//         (xmin+xmax)/2.+D , (ymin+ymax)/2.+2.*D , zmin+(zmax-zmin)*0.60 );
 
 }
Index: /trunk/SophyaPI/PI/pisurfdr.h
===================================================================
--- /trunk/SophyaPI/PI/pisurfdr.h	(revision 119)
+++ /trunk/SophyaPI/PI/pisurfdr.h	(revision 120)
@@ -15,5 +15,5 @@
   			~PISurfaceDrawer();
 
-  virtual void 		UpdateSize();   // Calcule et change la vue-3D
+  virtual void 		UpdateLimits();   // Calcule et change la vue-3D
 
   virtual void 		Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); 
Index: /trunk/SophyaPI/PI/piwdgx.cc
===================================================================
--- /trunk/SophyaPI/PI/piwdgx.cc	(revision 119)
+++ /trunk/SophyaPI/PI/piwdgx.cc	(revision 120)
@@ -115,7 +115,7 @@
 /* --Methode-- */
 int PIWdgX::CreateXtWdg(char *nom, SysDWdgClass wdgcl, SysDWdg pwdg,
-                        int sx, int sy, int px, int py)
-{
-Arg  wargs[5];
+                        int sx, int sy, int px, int py, Arg* oarg, int na)
+{
+Arg  wargs[20];
 int n=0;
 
@@ -139,4 +139,7 @@
 XtSetArg(wargs[n],XtNx,px);  n++;
 XtSetArg(wargs[n],XtNy,py);  n++;
+
+if (na > 16) { printf("PIWdgX::CreateXtWdg()/Warning: na=%d > Max=16 \n", na);  na = 16; }
+for(int kk=0; kk<na; kk++) { wargs[n] = oarg[kk]; n++; }
 
 if (wdgcl == NULL)  wdgcl = coreWidgetClass;
Index: /trunk/SophyaPI/PI/piwdgx.h
===================================================================
--- /trunk/SophyaPI/PI/piwdgx.h	(revision 119)
+++ /trunk/SophyaPI/PI/piwdgx.h	(revision 120)
@@ -29,12 +29,8 @@
   virtual ~PIWdgX();
 
-  int CreateXtWdg(char *nom, SysDWdgClass wdgcl=NULL, SysDWdg pwdg=NULL,
-                  int sx=10, int sy=10, int px=0, int py=0 );
-
   virtual void	 FinishCreate(); // apres avoir installe les sous-vues
 
   virtual void   SetSize(int sx, int sy);
   virtual void   SetPos(int px, int py);
-  virtual void   SetBorderWidth(int bw);
   virtual void   SetLabel(string const & lab);
   virtual void   SetBinding(PIBindingKind left, PIBindingKind top, 
@@ -45,5 +41,4 @@
   virtual int    XPos();
   virtual int    YPos();
-  virtual int    BorderWidth();
 
   virtual string Nom();  
@@ -67,10 +62,14 @@
   virtual void           PasteSelection(unsigned int typ, void *, unsigned int l);
 
+//  Usage limite a a la version X11
   inline SysDWdg XtWdg() const {return(sdw); }; 
   inline SysDWdg& XtWdg() {return(sdw); }; 
+  int 		CreateXtWdg(char *nom, SysDWdgClass wdgcl=NULL, SysDWdg pwdg=NULL,
+                  int sx=10, int sy=10, int px=0, int py=0, Arg* oarg=NULL, int na=0);
+  int   	BorderWidth();
+  void  	SetBorderWidth(int bw);
 
 protected:
-  int InitXt(int narg=0, char *arg[]=NULL); 
-
+  int 		InitXt(int narg=0, char *arg[]=NULL); 
 
   SysDWdg sdw;
