Changeset 145 in Sophya


Ignore:
Timestamp:
Sep 21, 1998, 6:59:44 PM (27 years ago)
Author:
ercodmgr
Message:

amelioration plot Histo/HProf avec marqueurs rz+cmv 21/9/98

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pihisto.cc

    r144 r145  
    3232    hmin -= v1;   hmax += v1;
    3333  }
     34  if(hmax<=hmin) hmax += 1.;
    3435  SetLimits(mHisto->XMin(), mHisto->XMax(), hmin, hmax);
    3536  SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
     
    4344  if (mMrk != PI_NotDefMarker || mHisto->ClassId() == HProf::classId ) {
    4445    // Marqeurs definis OU HBProf => marqueurs+Erreurs si il y en a
     46    if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine);
    4547    float x1,y1, x2,y2;
    4648    float bw = mHisto->BinWidth();
    4749    for (int i=0; i<mHisto->NBins(); i++) {
    48       // barres d'erreur verticales
    49       x1 = x2 = mHisto->BinCenter(i);
    50       y1 = (*mHisto)(i) - mHisto->Error(i);
    51       y2 = (*mHisto)(i) + mHisto->Error(i);
    52       g->DrawLine(x1,y1, x1, y2);
    53       // limites de barres d'erreurs (horizontales)
    54       x1 -= bw/3.;  x2 += bw/3.;
    55       g->DrawLine(x1,y1, x2, y1);
    56       g->DrawLine(x1,y2, x2, y2);
     50      if(mHisto->Error(i)>0.) {
     51        // barres d'erreur verticales
     52        x1 = x2 = mHisto->BinCenter(i);
     53        y1 = (*mHisto)(i) - mHisto->Error(i);
     54        y2 = (*mHisto)(i) + mHisto->Error(i);
     55        g->DrawLine(x1,y1, x1, y2);
     56        // limites de barres d'erreurs (horizontales)
     57        x1 -= bw/3.;  x2 += bw/3.;
     58        g->DrawLine(x1,y1, x2, y1);
     59        g->DrawLine(x1,y2, x2, y2);
     60      }
    5761      // le marqueur
    5862      x1 = mHisto->BinCenter(i);
Note: See TracChangeset for help on using the changeset viewer.