Changeset 3269 in Sophya for trunk/SophyaPI/PIext/pintuple.cc
- Timestamp:
- Jun 19, 2007, 4:14:55 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pintuple.cc
r3149 r3269 58 58 SelectErrBar(); 59 59 SelectLabel(NULL); 60 SelectColorByName(NULL); 61 SelectColorByIndex(NULL); 60 62 SetName("NTupleDrw"); 61 63 NptDraw = 0; … … 114 116 115 117 /* --Methode-- */ 118 void PINTuple::SelectColorByName(const char* pcolnm=NULL) 119 { 120 if (pcolnm == NULL) cnK = -1; 121 else { string name = pcolnm; cnK = mNT->ColumnIndex(name); } 122 if (cnK >= 0) ciK = -1; 123 } 124 125 /* --Methode-- */ 126 void PINTuple::SelectColorByIndex(const char* pcolidx=NULL) 127 { 128 if (pcolidx == NULL) ciK = -1; 129 else { string name = pcolidx; ciK = mNT->ColumnIndex(name); } 130 if (ciK >= 0) cnK = -1; 131 } 132 133 134 /* --Methode-- */ 116 135 void PINTuple::SelectErrBar(const char* erbx, const char* erby) 117 136 { … … 162 181 double dw = (wMax-wMin)/nWbins; 163 182 if (dw < 1.e-19) dw = 1.e-19; 183 184 // La couleur par defaut (pour le trace avec couleur specifie par nom de colonne (06/2007) 185 PIColors defcol = GetGraphicAtt().GetColor(); 186 if (defcol == PI_NotDefColor) defcol = PI_Black; 164 187 165 188 // Pour tracer des markers avec couleur en fonction de Wt (poids) … … 234 257 } 235 258 259 // Si on a specifie un nom de colonne pour la couleur (06/2007) 260 if ( (cnK >= 0) || (ciK >= 0) ) { 261 PIColors scol = defcol; 262 if (cnK > 0) 263 scol = PIGraphicAtt::ColNameToColor(mNT->GetCelltoString(i, cnK)); 264 else 265 scol = PIGraphicAtt::ColIndexToColor(mNT->GetCell(i, ciK)); 266 if (scol == PI_NotDefColor) scol = defcol; 267 g->SelForeground(scol); 268 } 269 236 270 // Trace d'une ligne reliant les points 237 271 if( connectPts ) { … … 273 307 274 308 if (stats) { // Trace de stats 309 g->SelForeground(defcol); 275 310 g->SelFontSz((YMax() - YMin())/30); 276 311 // La hauteur de la cellule
Note:
See TracChangeset
for help on using the changeset viewer.