Ignore:
Timestamp:
09/26/06 11:45:32 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHRate.cc

    r7841 r7971  
    182182void MHRate::DrawGraph(TGraph &g, const char *y) const
    183183{
     184    // If this is set to early the plot remains empty in root 5.12/00
     185    if (g.GetN()>0)
     186        g.SetMinimum(0);
     187
     188    // This is not done automatically anymore since root 5.12/00
     189    // and it is necessary to force a proper update of the axis.
    184190    TH1 *h = g.GetHistogram();
    185191    if (h)
    186192    {
     193        delete h;
     194        g.SetHistogram(0);
     195        h = g.GetHistogram();
     196    }
     197
     198    if (h)
     199    {
     200        cout << "Y";
    187201        TAxis *axe = h->GetXaxis();
    188202        axe->SetLabelSize(0.033);
     
    287301void MHRate::Paint(Option_t *o)
    288302{
    289     // If this is set to early the plot remains empty in root 5.12/00
    290     if (fRateTime.GetN()>0)
    291         fRateTime.SetMinimum(0);
    292 
    293303    DrawGraph(fRateTime, "f [Hz]");
    294304    /*
  • trunk/MagicSoft/Mars/mhist/MHWeather.cc

    r7841 r7971  
    160160    if (h)
    161161    {
     162        delete h;
     163        g.SetHistogram(0);
     164        h = g.GetHistogram();
     165    }
     166    if (h)
     167    {
    162168        TAxis *axe = h->GetXaxis();
    163169        axe->SetLabelSize(0.033);
Note: See TracChangeset for help on using the changeset viewer.