Index: trunk/SophyaPI/PIext/basexecut.cc
===================================================================
--- trunk/SophyaPI/PIext/basexecut.cc	(revision 1938)
+++ trunk/SophyaPI/PIext/basexecut.cc	(revision 1971)
@@ -61,5 +61,5 @@
   nx = ny = 1;
   nx = atoi(tokens[0].c_str());    ny = atoi(tokens[1].c_str());
-  mObjMgr->SetGraphicWinZone(nx, ny, false);
+  if (mImgApp) mImgApp->SetZone(nx, ny);
   }  
 else if (kw == "newwin") {
@@ -68,18 +68,20 @@
   if(tokens.size() > 0) nx = atoi(tokens[0].c_str());
   if(tokens.size() > 1) ny = atoi(tokens[1].c_str());
-  mObjMgr->SetGraphicWinZone(nx, ny, true);
+  if (mImgApp) mImgApp->CreateGraphWin(nx, ny);
   }  
 else if (kw == "stacknext") mImgApp->StackWinNext(); 
 else if (kw == "graphicatt") {
   if (tokens.size() < 1) { cout << "Usage: graphicatt attributes_list (att=def->defaut)" << endl;  return(0); }
-  mObjMgr->SetGraphicAttributes(tokens[0]); 
-  }
-else if (kw == "setxylimits") {
-  if (tokens.size() < 4) { cout << "Usage: setxylimits xmin xmax ymin ymax" << endl;  return(0); }
-  double xmin = atof(tokens[0].c_str());
-  double xmax = atof(tokens[1].c_str());
-  double ymin = atof(tokens[2].c_str());
-  double ymax = atof(tokens[3].c_str());
-  mImgApp->SetXYLimits(xmin, xmax, ymin, ymax);
+  string opts = tokens[0];
+  if (tokens.size() > 1) 
+    for(int kt=1; kt<tokens.size(); kt++)  { opts += ' '; opts += tokens[kt]; }
+  if (mImgApp) mImgApp->SetDefaultGraphicAttributes(opts);
+  }
+else if (kw == "setaxesatt") {
+  if (tokens.size() < 1) { cout << "Usage: setaxesatt attributes_list " << endl;  return(0); }
+  string opts = tokens[0];
+  if (tokens.size() > 1) 
+    for(int kt=1; kt<tokens.size(); kt++)  { opts += ' '; opts += tokens[kt]; }
+  if (mImgApp) mImgApp->SetDefaultAxesAttributes(opts);
   }
 else if (kw == "setinsetlimits") {
@@ -91,10 +93,4 @@
   mImgApp->SetInsetLimits(xmin, xmax, ymin, ymax);
   }
-else if (kw == "setimgcenter") {
-  if (tokens.size() < 2) { cout << "Usage: setimgcenter xc yc" << endl;  return(0); }
-  int xc = atoi(tokens[0].c_str());
-  int yc = atoi(tokens[1].c_str());
-  mImgApp->SetImageCenterPosition(xc, yc);
-  }
 else if (kw == "addtext") {
   if (tokens.size() < 3) { cout << "Usage: addtext x y txt [colfontatt]" << endl;  return(0); }
@@ -102,9 +98,7 @@
   double yp = atof(tokens[1].c_str());
   string txt = tokens[2];
-  bool fgsr = false;
-  if (tokens.size() > 3) 
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
-  mImgApp->AddText(txt, xp, yp);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+  string sop;
+  if (tokens.size() > 3) sop = tokens[3];
+  mImgApp->AddText(txt, xp, yp, sop);
   }
 else if ((kw == "addline") || (kw == "addrect") || (kw == "addfrect")) {
@@ -114,13 +108,11 @@
   double xp2 = atof(tokens[2].c_str());
   double yp2 = atof(tokens[3].c_str());
-  bool fgsr = false;
-  if (tokens.size() > 4) 
-   mObjMgr->GetServiceObj()->DecodeDispOption(tokens[4], fgsr);
-  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2);
+  string sop;
+  if (tokens.size() > 4) sop = tokens[4];
+  if (kw == "addline") mImgApp->AddLine(xp1, yp1, xp2, yp2, sop);
   else {
     bool fgfill = (kw == "addrect") ? false : true;
-    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, fgfill);
-  }
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+    mImgApp->AddRectangle(xp1, yp1, xp2, yp2, sop, fgfill);
+  }
   }
 else if ((kw == "addcirc") || (kw == "addfcirc")) {
@@ -130,9 +122,8 @@
   double rad = atof(tokens[2].c_str());
   bool fgsr = false;
-  if (tokens.size() > 3) 
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[3], fgsr);
+  string sop;
+  if (tokens.size() > 3) sop = tokens[3];
   bool fgfill = (kw == "addcirc") ? false : true;
-  mImgApp->AddCircle(xc, yc, rad, fgfill);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
+  mImgApp->AddCircle(xc, yc, rad, sop, fgfill);
   }
 
@@ -141,10 +132,5 @@
   if (tokens.size() < 1) { cout << "Usage: settitle TopTitle [BotTitle] [fontatt]" << endl;  return(0); }
   bool fgsr = true;
-  if (tokens.size() > 2)
-    mObjMgr->GetServiceObj()->DecodeDispOption(tokens[2], fgsr);
-  if (tokens.size() < 2)
-    tokens.push_back("");
   mImgApp->SetTitle(tokens[0], tokens[1]);
-  if (fgsr) mImgApp->RestoreGraphicAtt(); 
   }
   
@@ -397,5 +383,5 @@
     }
   else {
-    if (tokens.size() < 5)  tokens.push_back("n");
+    if (tokens.size() < 5)  tokens.push_back("next");
     mObjMgr->GetServiceObj()->PlotFunc2D(tokens[3], tokens[0], xmin, xmax, ymin, ymax, 
                                          nx, ny, tokens[4]);
@@ -415,5 +401,5 @@
 else if ( (kw == "disp") || (kw == "surf") || (kw == "imag") ) {
   if (tokens.size() < 1) { cout << "Usage: disp/surf/imag nameobj [opt]" << endl; return(0); }
-  string opt = "n";
+  string opt = "next";
   if (tokens.size() > 1)  opt = tokens[1];
   if (kw == "disp") mObjMgr->DisplayObj(tokens[0], opt);
@@ -457,5 +443,5 @@
   string numvary = "";
   string err = "";
-  string opt = "n";
+  string opt = "next";
   if(tokens.size()>2) err = tokens[2];
   if(tokens.size()>3) opt = tokens[3];
@@ -468,5 +454,5 @@
      return(0);}
   string err = "";
-  string opt = "n";
+  string opt = "next";
   if(tokens.size()>3) err = tokens[3];
   if(tokens.size()>4) opt = tokens[4];
@@ -767,5 +753,5 @@
 kw = "graphicatt";
 usage = "To change default graphic options \n  Usage: graphicatt att_list \n";
-usage += "att_list=def back to default values, Example: gratt red,circlemarker5";
+usage += "att_list=def back to default values, Example: gratt 'red circlemarker5'";
 usage += "\n ------------------ Graphic attribute list ------------------ \n";
 usage += ">> Colors: defcol black white grey red blue green yellow \n";
@@ -791,7 +777,7 @@
 usage += ">> ZoomFactors: defzoom zoomx1 zoomx2 zoomx3 zoomx4 zoomx5 \n";
 usage += "                               zoom/2 zoom/3 zoom/4 zoom/5 \n";
-usage += ">> Image centering: centerimg -> Position the image in widget \n";
+usage += ">> imagecenter=ix,iy -> Position the image in widget \n";
 usage += ">> Axes:  stdaxes=defaxes=boxaxes  simpleaxes boxaxesgrid \n";
-usage += "          fineaxes  grid=fineaxesgrid \n"; 
+usage += "          fineaxes  fineaxesgrid \n"; 
 usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
 usage += ">> XYLimits : xylimits  -> Forces X-Y limits in 2-D plots \n";
@@ -799,11 +785,15 @@
 usage += ">> title/notitle or tit/notit -> Toggle Auto AddTitle flag \n";
 usage += ">> DisplayWindow: next same win stack inset \n";
-usage += "   Related commands: setxylimits setinsetlimits setimgcenter";  
+usage += "   Related commands: setaxesatt setinsetlimits ";  
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
 
-kw = "setxylimits";
-usage = "Define 2-D plot limits \n Usage: setxylimits xmin xmax ymin ymax";
-usage += "\n  Related commands: graphicatt /xylimits";  
+kw = "setaxesatt";
+usage = "To set default axes attributes \n  Usage: setaxesatt att_list \n";
+usage += ">> Axes:  stdaxes=defaxes=boxaxes  simpleaxes boxaxesgrid \n";
+usage += "          fineaxes  fineaxesgrid \n"; 
+usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
+usage += ">> xylimits=xmin,xmax,ymin,ymax  -> Forces X-Y limits in 2-D plots \n";
 mpiac->RegisterCommand(kw, usage, this, "Graphics");
+
 
 kw = "setinsetlimits";
