Changeset 2383 in Sophya for trunk/SophyaPI/PIext/pintuple.cc
- Timestamp:
- May 16, 2003, 5:15:55 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintuple.cc
r2373 r2383 46 46 mAdDO = ad; 47 47 SetStats(true); 48 SetStatPosOffset(); 48 49 ConnectPoints(false); 49 50 UseSizeScale(true, 5); … … 237 238 // Les labels et leurs longueurs -> largeur de la cellule 238 239 char label[64]; 239 sprintf(label, "N d= %d / Ntot= %d", nok, mNT->NbLines());240 sprintf(label, "N=%d (/%d)", nok, mNT->NbLines()); 240 241 double cellWidth = 1.1 * (double)g->CalcStringWidth(label); 241 242 double xu, yu, cw; 243 double ofpx = spoX*(XMax()-XMin()); 244 double ofpy = spoY*(YMax()-YMin()); 242 245 // Les limites du cadre 243 246 xu = g->DeltaUCX(XMax(), - cellWidth); 244 247 yu = g->DeltaUCY(YMax(), - cellHeight); 245 g->DrawLine(xu, YMax(), xu, yu); 246 g->DrawLine(xu, yu, XMax(), yu); 248 double recw = XMax()-xu; 249 double rech = YMax()-yu; 250 xu += ofpx; yu += ofpy; 251 g->DrawBox(xu, yu, recw, rech); 247 252 // L'ecriture des labels (attention aux inversions possibles des axes!) 248 253 cw = (g->isAxeXDirRtoL()) ? -0.05*cellWidth : -0.95*cellWidth; … … 250 255 cw = (g->isAxeYDirUpDown()) ? -0.1*cH : -1.1*cH; 251 256 yu = g->DeltaUCY(YMax(),cw); 257 xu += ofpx; yu += ofpy; 252 258 g->DrawString(xu,yu,label); 253 259 } … … 313 319 else if( opts=="nsta" || opts=="nstat" 314 320 || opts=="nostat" || opts=="nostats") SetStats(false); 321 else if(opts.substr(0,11) == "statposoff=") { 322 float xo=0., yo=0.; 323 sscanf(opts.substr(11).c_str(),"%g,%g",&xo, &yo); 324 SetStatPosOffset(xo, yo); 325 } 315 326 else if (opts == "connectpoints") ConnectPoints(true); 316 327 else if (opts == "noconnectpoints") ConnectPoints(false); … … 323 334 UseSizeScale(true, nbn); 324 335 } 336 325 337 else { 326 338 // Si option non decode … … 350 362 info += " sta,stat,stats: activate statistic display\n"; 351 363 info += " nsta,nstat,nostat,nostats: deactivate statistic display\n"; 364 info += " statposoff=OffsetX,OffsetY : Position offset for Stats drawing \n"; 365 info += " as a fraction of total size \n"; 352 366 info += " connectpoints: The points are connected by a line \n"; 353 367 info += " noconnectpoints (this is the default) \n"; 354 368 info += " colorscale/nocolorscale (Use color scale for weight) \n"; 355 369 info += " sizescale/sizescale=nbins/nosizescale (Use marker size for weight) \n"; 356 info += " and usual color/line/marker/... attribute decoding\n";370 info += " (and usual color/line/marker/... attribute decoding) \n"; 357 371 return; 358 372 }
Note:
See TracChangeset
for help on using the changeset viewer.