Ignore:
Timestamp:
12/15/04 14:59:24 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r5429 r5603  
    547547//   PROFY: Draw a y-profile into the histogram (for 2D histograms only)
    548548//   ONLY:  Draw the profile histogram only (for 2D histograms only)
     549//   BLUE:  Draw the profile in blue color instead of the histograms line color
    549550//
    550551// If the kIsLog?-Bit is set the axis is displayed lkogarithmically.
     
    565566
    566567    Bool_t only = str.Contains("ONLY", TString::kIgnoreCase) && fDimension==2;
     568    Bool_t same = str.Contains("SAME", TString::kIgnoreCase) && fDimension==2;
     569    Bool_t blue = str.Contains("BLUE", TString::kIgnoreCase) && fDimension==2;
    567570    // FIXME: We may have to remove all our own options from str!
    568571    if (!only)
     
    574577    {
    575578        TProfile *p = ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s");
    576         p->SetLineColor(kBlue);
    577         p->Draw(only?"":"same");
     579        p->UseCurrentStyle();
     580        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
     581        p->Draw(only&&!same?"":"same");
    578582        p->SetBit(kCanDelete);
    579583        p->SetDirectory(NULL);
     584        p->SetXTitle(fHist->GetXaxis()->GetTitle());
     585        p->SetYTitle(fHist->GetYaxis()->GetTitle());
    580586    }
    581587    if (str.Contains("PROFY", TString::kIgnoreCase) && fDimension==2)
     
    583589        TProfile *p = ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s");
    584590        p->UseCurrentStyle();
    585         p->SetLineColor(kBlue);
    586         p->Draw(only?"":"same");
     591        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
     592        p->Draw(only&&!same?"":"same");
    587593        p->SetBit(kCanDelete);
    588594        p->SetDirectory(NULL);
     595        p->SetYTitle(fHist->GetXaxis()->GetTitle());
     596        p->SetXTitle(fHist->GetYaxis()->GetTitle());
    589597    }
    590598
Note: See TracChangeset for help on using the changeset viewer.