Changeset 2350 in Sophya


Ignore:
Timestamp:
Mar 18, 2003, 3:23:53 PM (23 years ago)
Author:
ansari
Message:

Ajout nouvelles options pour trace d'axes ds le Help de baseexecut.cc
et ajout d'une nouvelle option (connectpoints) ds PINTupleDrawer (et 3D)

Reza 18 Mars 2003

Location:
trunk/SophyaPI/PIext
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/basexecut.cc

    r2307 r2350  
    11371137usage += ">> lut=ltyp,min,max -> Sets LUT type and min/max for image display \n";
    11381138usage += "                       (ltyp=lin/log/sqrt/square) \n";
    1139 usage += ">> Axes:  stdaxes=defaxes=boxaxes boxaxesgrid centeredaxes\n";
    1140 usage += "          fineaxes finecenteredaxes fineaxesgrid\n";
    1141 usage += "          centeredaxesgrid finecenteredaxesgrid \n";
    1142 usage += "          grid nogrid labels nolabels ticks noticks \n";
    1143 usage += "          minorticks nominorticks extticks intticks axesnone \n";
    1144 usage += ">> Axe labels font size: fixedfontsize/autofontsize \n";
    1145 usage += "          autofontsize: Font size computed automatically \n";
    1146 usage += "          fixedfontsize: Use font size attribute (BaseDrawer) \n";
    1147 usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
    1148 usage += ">> xylimits=xmin,xmax,ymin,ymax  -> Forces X-Y limits in 2-D plots \n";
    1149 usage += ">> defdrrect=xmin,xmax,ymin,ymax -> Defines drawing rectangle 2-D plots \n";
    1150 usage += "          The rectangle is defined as a fraction of the widget size\n";
     1139usage += ">> Axes / Axe labels / LogScale / xylimits / defdrrect \n";
     1140usage += "   See setaxesatt command \n";
    11511141usage += ">> stat/nostat or stats/nostats -> Toggle statistic display flag \n";
    11521142usage += ">> title/notitle or tit/notit -> Toggle Auto AddTitle flag \n";
     
    11581148usage = "To set default axes attributes \n  Usage: setaxesatt att_list \n";
    11591149usage += "Color/Line/Font attributes and axes attributes \n";
    1160 usage += ">> Axes:  stdaxes=defaxes=boxaxes boxaxesgrid centeredaxes\n";
    1161 usage += "          fineaxes finecenteredaxes fineaxesgrid \n";
     1150usage += ">> Axes:  axesnone stdaxes=defaxes=boxaxes boxaxesgrid \n";
     1151usage += "          fineaxes fineaxesgrid centeredaxes finecenteredaxes \n";
    11621152usage += "          centeredaxesgrid finecenteredaxesgrid \n";
    1163 usage += "          grid nogrid labels nolabels ticks noticks \n";
    1164 usage += "          minorticks nominorticks extticks intticks axesnone \n";
    1165 usage += ">> Axe labels font size: fixedfontsize/autofontsize \n";
    1166 usage += "          autofontsize: Font size computed automatically \n";
     1153usage += "          grid nogrid labels nolabels  \n";
     1154usage += "          ticks noticks minorticks nominorticks \n";
     1155usage += "          extticks intticks extintticks \n";
     1156usage += "          nbticks=X_NTicks,Y_NTicks  \n";
     1157usage += "          tickslen=MajTickLenFrac,MinTickLenFrac \n";
     1158usage += ">> Axe labels font size: fixedfontsize/autofontsize=fszf \n";
     1159usage += "          autofontsize=fsizef: Font size computed automatically \n";
    11671160usage += "          fixedfontsize: Use font size attribute (BaseDrawer) \n";
    11681161usage += ">> LogScale : linx liny logx logy -> Lin/Log Scales for 2D plots \n";
  • trunk/SophyaPI/PIext/piaversion.h

    r2293 r2350  
    22#define PIAPPVERSION_H_SEEN
    33
    4 #define PIAPP_VERSIONNUMBER  3.90
     4#define PIAPP_VERSIONNUMBER  3.93
    55
    66#endif
  • trunk/SophyaPI/PIext/pihisto2d.cc

    r2301 r2350  
    696696//|     et de l'histogramme.
    697697//--
    698 : PIWindow((PIMsgHandler *)par,"Options",PIWK_dialog,250,260,150,150)
     698: PIWindow((PIMsgHandler *)par,"H2D-Options",PIWK_dialog,250,260,150,150)
    699699, mFgCol(false), mCmap(CMAP_GREYINV32), mRevCmap(false)
    700700, mTypScal(0)  , mLogScale(10.)
  • trunk/SophyaPI/PIext/pintup3d.cc

    r2165 r2350  
    207207  yp = mNT->GetCell(i, yK);
    208208  zp = mNT->GetCell(i, zK);
    209   if ( (i > 0) &&
    210        (GetGraphicAtt().GetLineAtt() != PI_NotDefLineAtt) )   // On relie les points ...
     209  if ( (i > 0) && connectPts ) // On relie les points ...
    211210    g3->DrawLine3D(xl, yl, zl, xp, yp, zp);
    212211  nok++;
     
    241240}
    242241
     242/*  La methode DecodeOptionString permet de decoder un ensemble d'options
     243    et de parametre d'affichage specifie sous forme d'un vecteur de string.
     244    Si rmdecopt == true, les options decodees sont supprimees du vecteur
     245    de string fourni en entree - ce qui permet l'enchainement eventuel
     246    de plusieurs decodages de string.
     247    Les options peuvent etre sous forme de flag : "stat" "nostat"
     248    ou plus complexes, par exemple "dynamic=-3,3"
     249    Rc: La methode renvoie le nombre d'options decodees
     250*/
     251
     252/* --Methode-- */
     253int PINTuple3D::DecodeOptionString(vector<string> & opt, bool rmdecopt)
     254{
     255  int optsz1 = opt.size();
     256  if(optsz1<1)  return(0); 
     257  // On appelle d'abord le decodage de la classe PIDrawer de laquelle
     258  // on herite. (Pas obligatoire) on decode donc ici les attributs de
     259  // couleur, fontes ...
     260  int ndec1 = PIDrawer::DecodeOptionString(opt, rmdecopt);
     261  if(optsz1-ndec1<1) return(ndec1);  // si tout a ete decode
     262
     263  vector<string> udopt;  // On gardera ici les options non decodees
     264  unsigned int k = 0;
     265  int ndec = opt.size();
     266  for( k=0; k<opt.size(); k++ ) {
     267    string opts = opt[k];
     268    //    if(opts=="sta" || opts=="stat" || opts=="stats") SetStats(true);
     269    //    else if(  opts=="nsta"   || opts=="nstat"
     270    //           || opts=="nostat" || opts=="nostats") SetStats(false);
     271    if (opts == "connectpoints") ConnectPoints(true);
     272    else if (opts == "noconnectpoints") ConnectPoints(false);
     273    else {
     274      // Si option non decode
     275      ndec--;
     276      // S'il faut supprimer les options decodees
     277      if (rmdecopt)  udopt.push_back(opts);
     278    }
     279  } 
     280  // S'il faut supprimer les options decodees, on remplace l'argument opt
     281  // par le vecteur des options non decodees.
     282  if (rmdecopt)  opt = udopt;
     283  return(ndec+ndec1); 
     284}
     285
     286/* La methode GetOptionsHelpInfo(string& info) renvoie une chaine
     287   avec la description des options comprises par ce drawer 
     288   Note: Il est preferable de ne pas initialiser la chaine
     289   string info au depart, afin de permettre de mettre bout a
     290   bout les aides de differents Drawer */
     291
     292/* --Methode-- */
     293void PINTuple3D::GetOptionsHelpInfo(string& info)
     294{
     295// On recupere d'abord la chaine info de la classe de base
     296PIDrawer::GetOptionsHelpInfo(info);
     297info += " ---- PINTuple3D options help info : \n" ;
     298info += "  connectpoints: The points are connected by a line \n";
     299info += "  noconnectpoints (this is the default) \n";
     300info += "  and usual color/line/marker/... attribute decoding  \n";
     301return;
     302}
     303
  • trunk/SophyaPI/PIext/pintup3d.h

    r486 r2350  
    1818  virtual void       SelectLabel(const char* plabel);
    1919
     20  inline  void       ConnectPoints(bool fg=false) { connectPts = fg; }
     21
     22//   Methode de decodage des options
     23  virtual int        DecodeOptionString(vector<string> & opt, bool rmdecopt=true);
     24//   Texte d'aide des options disponibles
     25  virtual void       GetOptionsHelpInfo(string& info);
    2026       
    2127protected:
     
    2935  int nWbins;               // Nombre de bins pour le poids (Wt)
    3036
     37  bool connectPts;          // true -> les points sont relies par une ligne
     38
    3139};
    3240
  • trunk/SophyaPI/PIext/pintuple.cc

    r2229 r2350  
    4646  mAdDO = ad;
    4747  SetStats(true);
     48  ConnectPoints(false);
    4849  SelectXY(NULL, NULL);
    4950  SelectWt(NULL, 1);
     
    177178  nok++;
    178179  if ( (xp < xmin) || (xp > xmax) || (yp < ymin) || (yp > ymax) )  continue;
    179   if ( (i > 0) && (GetGraphicAtt().GetLineAtt() != PI_NotDefLineAtt) )   
     180  if ( (i > 0) && connectPts )   
    180181    g->DrawLine(xl, yl, xp, yp);  // On relie les points ...
    181182  if ( xebK >= 0 ) {
     
    286287    else if(  opts=="nsta"   || opts=="nstat"
    287288           || opts=="nostat" || opts=="nostats") SetStats(false);
     289    else if (opts == "connectpoints") ConnectPoints(true);
     290    else if (opts == "noconnectpoints") ConnectPoints(false);
    288291    else {
    289292      // Si option non decode
     
    311314PIDrawer::GetOptionsHelpInfo(info);
    312315info += " ---- PINTuple options help info : \n" ;
    313 info += "- sta,stat,stats:            activate   statistic display\n";
     316info += "  sta,stat,stats:            activate   statistic display\n";
    314317info += "  nsta,nstat,nostat,nostats: deactivate statistic display\n";
     318info += "  connectpoints: The points are connected by a line \n";
     319info += "  noconnectpoints (this is the default) \n";
     320info += "  and usual color/line/marker/... attribute decoding  \n";
    315321return;
    316322}
  • trunk/SophyaPI/PIext/pintuple.h

    r1975 r2350  
    2424
    2525  inline  void       SetStats(bool fg=true) { stats = fg; }
     26  inline  void       ConnectPoints(bool fg=false) { connectPts = fg; }
     27
    2628  virtual void       AppendTextInfo(string& info, double xmin, double ymin, double xmax, double ymax);
    2729
     
    4143  int nWbins;               // Nombre de bins pour le poids (Wt)
    4244  bool stats;               // true -> indication du nb de points
     45  bool connectPts;          // true -> les points sont relies par une ligne
    4346};
    4447
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r2265 r2350  
    287287
    288288// Attributs graphiques courants
    289 mAxesFlags = kBoxAxes | kExtTicks | kLabels;
     289mAxesFlags = kAxesDflt;
    290290SetInsetLimits(0.4, 0.6, 0.4, 0.6);
    291291mAddTitle = true;
Note: See TracChangeset for help on using the changeset viewer.