Changeset 2523 in Sophya for trunk/SophyaPI/PIext
- Timestamp:
- Mar 19, 2004, 2:06:08 PM (22 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pihisto.cc
r2517 r2523 196 196 || opts=="nostat" || opts=="nostats") SetStats(false); 197 197 else if(opts=="err") SetError(1); 198 else if(opts=="noerr" ) SetError(-1);198 else if(opts=="noerr" || opts=="nerr") SetError(-1); 199 199 else if(opts=="autoerr") SetError(0); 200 200 else if(opts=="fill") SetFilled(true); 201 else if(opts=="nofill" ) SetFilled(false);201 else if(opts=="nofill" || opts=="nfill") SetFilled(false); 202 202 else if(opts.substr(0,11) == "statposoff=") { 203 203 float xo=0., yo=0.; … … 217 217 } 218 218 219 int 220 PIHisto::OptionToString(vector<string> & opt) const 221 { 222 PIDrawer::OptionToString(opt); 223 224 if(stats) opt.push_back("stat"); else opt.push_back("nstat"); 225 if(error==-1) opt.push_back("noerr"); 226 else if(error==0) opt.push_back("autoerr"); 227 else if(error==1) opt.push_back("err"); 228 if(filled) opt.push_back("fill"); else opt.push_back("nofill"); 229 230 char str[256]; sprintf(str,"statposoff=%g,%g",spoX,spoY); 231 opt.push_back(str); 232 233 return 1; 234 } 235 219 236 void 220 237 PIHisto::GetOptionsHelpInfo(string& info) … … 223 240 info += " sta,stat,stats: activate statistic display\n"; 224 241 info += " nsta,nstat,nostat,nostats: deactivate statistic display\n"; 225 info += " err / n err : draw, do not draw error bars\n";242 info += " err / noerr,nerr : draw, do not draw error bars\n"; 226 243 info += " autoerr : draw error bars if Marker drawing requested OR Profile histo\n"; 227 info += " fill / nofill : fill, do not fill bars with selected color\n";244 info += " fill / nofill,nfill : fill, do not fill bars with selected color\n"; 228 245 info += " statposoff=OffsetX,OffsetY : Position offset for Stats drawing \n"; 229 246 info += " as a fraction of total size \n"; -
trunk/SophyaPI/PIext/pihisto.h
r2517 r2523 16 16 inline void SetStats(bool fg=true) {stats=fg;} 17 17 inline void SetStatPosOffset(float ofx=-0.01, float ofy=-0.01) 18 {spoX=ofx; spoY=ofy; }18 {spoX=ofx; spoY=ofy; } 19 19 // fg=-1 pas de barre d'erreur, 1=barres d'erreurs, 20 20 // 0=barres d'erreurs automatiques: trace si HProf ou markeur demande … … 25 25 // Methode de decodage des options 26 26 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 27 virtual int OptionToString(vector<string> & opt) const; 27 28 virtual void GetOptionsHelpInfo(string& info); 28 29 -
trunk/SophyaPI/PIext/pihisto2d.cc
r2388 r2523 576 576 } 577 577 578 int PIHisto2D::OptionToString(vector<string> & opt) const 579 { 580 PIDrawer::OptionToString(opt); 581 char str[256]; 582 583 if(stats) opt.push_back("stat"); else opt.push_back("nstat"); 584 585 sprintf(str,"statposoff=%f,%f",spoX,spoY); 586 opt.push_back(str); 587 588 if(mTypDisp==0) sprintf(str,"h2disp=var"); 589 else if(mTypDisp==1) sprintf(str,"h2disp=pts,%g",mFPoints); 590 else if(mTypDisp==2) sprintf(str,"h2disp=hbk"); 591 else if(mTypDisp==3) sprintf(str,"h2disp=img"); 592 opt.push_back(str); 593 594 if(mTypScal==0) sprintf(str,"h2scale=lin"); 595 else if(mTypScal==1) sprintf(str,"h2disp=log,%g",mLogScale); 596 opt.push_back(str); 597 598 sprintf(str,"h2dyn=%g,%g",mHMin,mHMax); 599 opt.push_back(str); 600 601 sprintf(str,"h2frac=%g,%g",mFracMin,mFracMax); 602 opt.push_back(str); 603 604 if(mRevCmap) opt.push_back("revcmap"); 605 606 return 1; 607 } 608 609 578 610 //++ 579 611 void PIHisto2D::GetOptionsHelpInfo(string& info) -
trunk/SophyaPI/PIext/pihisto2d.h
r2383 r2523 52 52 // Methode de decodage des options 53 53 virtual int DecodeOptionString(vector<string> & opt, bool rmdecopt=true); 54 virtual int OptionToString(vector<string> & opt) const; 54 55 virtual void GetOptionsHelpInfo(string& info); 55 56
Note:
See TracChangeset
for help on using the changeset viewer.