| 1 |
// @(#)root/graf:$Name: $:$Id: TMultiGraph.cxx,v 1.5 2002/01/23 17:52:49 rdm Exp $ |
// @(#)root/graf:$Name: $:$Id: TMultiGraph.cxx,v 1.6 2002/01/24 11:39:28 rdm Exp $ |
| 2 |
// Author: Rene Brun 12/10/2000 |
// Author: Rene Brun 12/10/2000 |
| 3 |
|
|
| 4 |
/************************************************************************* |
/************************************************************************* |
| 183 |
rwxmax = gPad->GetUxmax(); |
rwxmax = gPad->GetUxmax(); |
| 184 |
rwymin = gPad->GetUymin(); |
rwymin = gPad->GetUymin(); |
| 185 |
rwymax = gPad->GetUymax(); |
rwymax = gPad->GetUymax(); |
| 186 |
|
char *xtitle = 0; |
| 187 |
|
char *ytitle = 0; |
| 188 |
|
Int_t firstx = 0; |
| 189 |
|
Int_t lastx = 0; |
| 190 |
|
|
| 191 |
if (fHistogram) { |
if (fHistogram) { |
| 192 |
//cleanup in case of a previous unzoom |
//cleanup in case of a previous unzoom |
| 193 |
if (fHistogram->GetMinimum() >= fHistogram->GetMaximum()) { |
if (fHistogram->GetMinimum() >= fHistogram->GetMaximum()) { |
| 194 |
|
Int_t nch = strlen(fHistogram->GetXaxis()->GetTitle()); |
| 195 |
|
firstx = fHistogram->GetXaxis()->GetFirst(); |
| 196 |
|
lastx = fHistogram->GetXaxis()->GetLast(); |
| 197 |
|
if (nch) { |
| 198 |
|
xtitle = new char[nch+1]; |
| 199 |
|
strcpy(xtitle,fHistogram->GetXaxis()->GetTitle()); |
| 200 |
|
} |
| 201 |
|
nch = strlen(fHistogram->GetYaxis()->GetTitle()); |
| 202 |
|
if (nch) { |
| 203 |
|
ytitle = new char[nch+1]; |
| 204 |
|
strcpy(ytitle,fHistogram->GetYaxis()->GetTitle()); |
| 205 |
|
} |
| 206 |
delete fHistogram; |
delete fHistogram; |
| 207 |
fHistogram = 0; |
fHistogram = 0; |
| 208 |
} |
} |
| 282 |
fHistogram->SetMaximum(rwymax); |
fHistogram->SetMaximum(rwymax); |
| 283 |
fHistogram->GetYaxis()->SetLimits(rwymin,rwymax); |
fHistogram->GetYaxis()->SetLimits(rwymin,rwymax); |
| 284 |
fHistogram->SetDirectory(0); |
fHistogram->SetDirectory(0); |
| 285 |
|
if (xtitle) {fHistogram->GetXaxis()->SetTitle(xtitle); delete [] xtitle;} |
| 286 |
|
if (ytitle) {fHistogram->GetYaxis()->SetTitle(ytitle); delete [] ytitle;} |
| 287 |
|
if (firstx != lastx) fHistogram->GetXaxis()->SetRange(firstx,lastx); |
| 288 |
} |
} |
| 289 |
fHistogram->Paint(); |
fHistogram->Paint(); |
| 290 |
} |
} |