[root] / trunk / hist / hist / src / TMultiGraph.cxx Repository:
ViewVC logotype

Diff of /trunk/hist/hist/src/TMultiGraph.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 37735, Fri Jan 7 10:20:05 2011 UTC revision 40956, Tue Sep 20 15:50:44 2011 UTC
# Line 971  Line 971 
971        char *ytitle = 0;        char *ytitle = 0;
972        Int_t firstx = 0;        Int_t firstx = 0;
973        Int_t lastx  = 0;        Int_t lastx  = 0;
974          Bool_t timedisplay = kFALSE;
975          char *timeformat = 0;
976    
977        if (fHistogram) {        if (fHistogram) {
978           //cleanup in case of a previous unzoom           //cleanup in case of a previous unzoom
# Line 978  Line 980 
980              nch = strlen(fHistogram->GetXaxis()->GetTitle());              nch = strlen(fHistogram->GetXaxis()->GetTitle());
981              firstx = fHistogram->GetXaxis()->GetFirst();              firstx = fHistogram->GetXaxis()->GetFirst();
982              lastx  = fHistogram->GetXaxis()->GetLast();              lastx  = fHistogram->GetXaxis()->GetLast();
983                timedisplay = fHistogram->GetXaxis()->GetTimeDisplay();
984              if (nch) {              if (nch) {
985                 xtitle = new char[nch+1];                 xtitle = new char[nch+1];
986                 strlcpy(xtitle,fHistogram->GetXaxis()->GetTitle(),nch+1);                 strlcpy(xtitle,fHistogram->GetXaxis()->GetTitle(),nch+1);
# Line 987  Line 990 
990                 ytitle = new char[nch+1];                 ytitle = new char[nch+1];
991                 strlcpy(ytitle,fHistogram->GetYaxis()->GetTitle(),nch+1);                 strlcpy(ytitle,fHistogram->GetYaxis()->GetTitle(),nch+1);
992              }              }
993                nch = strlen(fHistogram->GetXaxis()->GetTimeFormat());
994                if (nch) {
995                  timeformat = new char[nch+1];
996                  strlcpy(timeformat,fHistogram->GetXaxis()->GetTimeFormat(),nch+1);
997                }
998              delete fHistogram;              delete fHistogram;
999              fHistogram = 0;              fHistogram = 0;
1000           }           }
# Line 1071  Line 1079 
1079           if (xtitle) {fHistogram->GetXaxis()->SetTitle(xtitle); delete [] xtitle;}           if (xtitle) {fHistogram->GetXaxis()->SetTitle(xtitle); delete [] xtitle;}
1080           if (ytitle) {fHistogram->GetYaxis()->SetTitle(ytitle); delete [] ytitle;}           if (ytitle) {fHistogram->GetYaxis()->SetTitle(ytitle); delete [] ytitle;}
1081           if (firstx != lastx) fHistogram->GetXaxis()->SetRange(firstx,lastx);           if (firstx != lastx) fHistogram->GetXaxis()->SetRange(firstx,lastx);
1082             if (timedisplay) {fHistogram->GetXaxis()->SetTimeDisplay(timedisplay);}
1083             if (timeformat) {fHistogram->GetXaxis()->SetTimeFormat(timeformat); delete [] timeformat;}
1084        }        }
1085        fHistogram->Paint("0");        fHistogram->Paint("0");
1086     }     }

Legend:
Removed from v.37735  
changed lines
  Added in v.40956

Subversion Admin
ViewVC Help
Powered by ViewVC 1.0.9