Index: /MEMPHYS/HEAD/applications/MEMPHYS_analysis.cxx
===================================================================
--- /MEMPHYS/HEAD/applications/MEMPHYS_analysis.cxx	(revision 168)
+++ /MEMPHYS/HEAD/applications/MEMPHYS_analysis.cxx	(revision 169)
@@ -7,6 +7,9 @@
 #include <iostream>
 
-//////////////////////////////////////////////////////////////////////////////
-bool getXYZ(
+// Lib :
+#include <Lib/smanip.h>
+
+//////////////////////////////////////////////////////////////////////////////
+bool get_XYZ(
  AIDA::ITuple& aParent
 ,int aColumn
@@ -63,5 +66,5 @@
 
     double dx,dy,dz;
-    if(!getXYZ(*tuple,3,dx,dy,dz)) return false;
+    if(!get_XYZ(*tuple,3,dx,dy,dz)) return false;
 
     double mass = tuple->getDouble(4);
@@ -70,11 +73,11 @@
 
     double px,py,pz;
-    if(!getXYZ(*tuple,7,px,py,pz)) return false;
+    if(!get_XYZ(*tuple,7,px,py,pz)) return false;
 
     double start_x,start_y,start_z;
-    if(!getXYZ(*tuple,8,start_x,start_y,start_z)) return false;
+    if(!get_XYZ(*tuple,8,start_x,start_y,start_z)) return false;
 
     double stop_x,stop_y,stop_z;
-    if(!getXYZ(*tuple,9,stop_x,stop_y,stop_z)) return false;
+    if(!get_XYZ(*tuple,9,stop_x,stop_y,stop_z)) return false;
 
     int startVol = tuple->getInt(10);
@@ -175,4 +178,120 @@
 }
 //////////////////////////////////////////////////////////////////////////////
+void set_region_style(
+ AIDA::IPlotterRegion& aRegion
+) 
+//////////////////////////////////////////////////////////////////////////////
+// Taken from G4SPL_analysis.cxx.
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!//
+{
+  //FIXME : have to do the below with AIDA styles.
+
+  // ROOT is in NDC, then we take a plotter with width = height = 1
+
+  // PAW :
+  //float XSIZ = 20.0F;
+  //float XLAB = 1.4F;
+  //float YSIZ = 20.0F;
+  //float YLAB = 1.4F;
+
+  float XLAB = 1.4F/20.0F; //0.07 //x distance of y title to data frame.
+  float YLAB = 0.8F/20.0F; //0.04 //y distance of x title to data frame.
+  YLAB = 0.05F; //FIXME : cooking.
+
+  // To have a good matching with ROOT for text size :
+  //double majic = 0.014/0.027;
+  double majic = 0.6;
+  std::string s = Lib::smanip::tostring(majic);
+  //FIXME : have methods for the below :
+  aRegion.style().setParameter("textScale",s);
+  aRegion.style().xAxisStyle().setParameter("magStyle.scale",s);
+  aRegion.style().yAxisStyle().setParameter("magStyle.scale",s);
+  aRegion.style().xAxisStyle().tickLabelStyle().setParameter("scale",s);
+  aRegion.style().xAxisStyle().labelStyle().setParameter("scale",s);
+  aRegion.style().yAxisStyle().tickLabelStyle().setParameter("scale",s);
+  aRegion.style().yAxisStyle().labelStyle().setParameter("scale",s);
+
+  // ROOT def margins 0.1. SoPlotter def 0.1.
+  aRegion.layout().setParameter("rightMargin",0.1);
+  aRegion.layout().setParameter("topMargin",0.1);
+  //gStyle->SetPadBottomMargin(0.15);
+  aRegion.layout().setParameter("leftMargin",0.15);
+  //gStyle->SetPadLeftMargin(0.15);
+  aRegion.layout().setParameter("bottomMargin",0.15);
+
+  aRegion.style().setParameter("superposeBins","TRUE");
+  aRegion.setParameter("plotter.wallStyle.visible","FALSE");
+  aRegion.setParameter("plotter.gridStyle.visible","FALSE");
+
+  //std::string font = "Hershey"; //PAW font.
+  //std::string font = "TTF/arialbd"; //Default ROOT font 62.
+  //std::string font = "TTF/couri";
+  std::string font = "TTF/times"; //= ROOT 132 ?
+  //std::string smoothing = "FALSE";
+  std::string smoothing = "TRUE";
+
+  // X axis :
+  aRegion.style().xAxisStyle().tickLabelStyle().setFont(font);
+  aRegion.style().xAxisStyle().tickLabelStyle().setParameter("smoothing",smoothing);
+  aRegion.style().xAxisStyle().labelStyle().setFont(font);
+  aRegion.style().xAxisStyle().labelStyle().setParameter("smoothing",smoothing);
+  aRegion.setParameter("plotter.xAxis.magStyle.fontName",font);
+  aRegion.setParameter("plotter.xAxis.magStyle.smoothing",smoothing);
+  aRegion.style().xAxisStyle().lineStyle().setThickness(2);
+  aRegion.setParameter("plotter.xAxis.ticksStyle.width","2");
+  aRegion.style().setParameter("topAxisVisible","TRUE");
+  // Set hplot tick modeling :
+  aRegion.style().xAxisStyle().setParameter("modeling","hplot");
+  aRegion.style().xAxisStyle().setParameter("divisions","505");
+
+  // Y axis :
+  //aRegion.style().setParameter("yAxisLogScale","TRUE");
+  aRegion.style().yAxisStyle().tickLabelStyle().setFont(font);
+  aRegion.style().yAxisStyle().tickLabelStyle().setParameter("smoothing",smoothing);
+  aRegion.style().yAxisStyle().labelStyle().setFont(font);
+  aRegion.style().yAxisStyle().labelStyle().setParameter("smoothing",smoothing);
+  aRegion.setParameter("plotter.yAxis.magStyle.fontName",font);
+  aRegion.setParameter("plotter.yAxis.magStyle.smoothing",smoothing);
+  aRegion.style().yAxisStyle().lineStyle().setThickness(2);
+  aRegion.setParameter("plotter.yAxis.ticksStyle.width","2");
+
+  //gStyle->SetTitleSize(0.06,"XYZ"); //ROOT def 0.04. SoPlotter : 0.014
+  aRegion.setParameter("plotter.xAxis.titleHeight","0.06");
+  aRegion.setParameter("plotter.yAxis.titleHeight","0.06");
+  //gStyle->SetLabelOffset(0.01,"Y"); //ROOT def 0.005. SoPlotter def 0.02
+  aRegion.setParameter("plotter.yAxis.labelToAxis","0.01");
+  //gStyle->SetTitleOffset(1.1,"Y");
+  aRegion.setParameter("plotter.yAxis.titleToAxis",
+   Lib::smanip::tostring(1.1*XLAB));
+  aRegion.setParameter("plotter.xAxis.titleToAxis",
+   Lib::smanip::tostring(1.1*YLAB));
+  //gStyle->SetLabelSize(0.05,"XYZ"); //ROOT def 0.04. SoPlotter def 0.014.
+  aRegion.setParameter("plotter.yAxis.labelHeight","0.05");
+  aRegion.setParameter("plotter.xAxis.labelHeight","0.05");
+
+  aRegion.style().setParameter("rightAxisVisible","TRUE");
+  // Set hplot tick modeling :
+  aRegion.style().yAxisStyle().setParameter("modeling","hplot");
+  aRegion.style().yAxisStyle().setParameter("divisions","505");
+
+  // title :
+  aRegion.style().setParameter("titleHeight","0.04");
+  aRegion.style().setParameter("titleToAxis","0.02");
+  aRegion.style().titleStyle().textStyle().setFont(font);
+  aRegion.style().titleStyle().textStyle().setParameter("smoothing",smoothing);
+  aRegion.style().titleStyle().textStyle().setColor("0 0 1");
+
+  // legend box :
+  aRegion.setParameter("legendRegionVisible","TRUE");
+  aRegion.setParameter("legendRegion.viewportRegion.backgroundColor","1 1 0");
+  aRegion.setParameter("legendRegionSize","0.15 0.16");
+  aRegion.setParameter("legendRegionOrigin","0.1 0.1");
+  aRegion.setParameter("legendRegion.horizontalMargin","2");
+  aRegion.setParameter("legendRegion.verticalMargin","2");
+
+  // Frame :
+  aRegion.setParameter("plotter.innerFrameStyle.lineWidth","2");
+}
+//////////////////////////////////////////////////////////////////////////////
 bool plot(
  AIDA::IAnalysisFactory& aAIDA
@@ -201,10 +320,17 @@
   plotter->createRegions(1,2,0);
 
-  plotter->setCurrentRegionNumber(0);
-  plotter->currentRegion().plot(aHisto1D);
-
-  plotter->setCurrentRegionNumber(1);
-  plotter->currentRegion().plot(aHisto2D);
-
+ {plotter->setCurrentRegionNumber(0);
+  AIDA::IPlotterRegion& region = plotter->currentRegion();
+  set_region_style(region);
+  region.style().xAxisStyle().setLabel("time");
+  region.style().yAxisStyle().setLabel("Entries");
+  region.plot(aHisto1D);}
+
+ {plotter->setCurrentRegionNumber(1);
+  AIDA::IPlotterRegion& region = plotter->currentRegion();
+  set_region_style(region);
+  region.style().xAxisStyle().setLabel("time");
+  region.style().yAxisStyle().setLabel("PE");
+  region.plot(aHisto2D);}
 
   plotter->show();
@@ -314,6 +440,6 @@
 
   int nentries = tuple->rows();
-  //int nentries = 100000;
-  //int nentries = 40;
+  //nentries = 100000;
+  nentries = 40;
   std::cout << header 
             << "traitements de " << nentries << " entrees" 
