Changeset 6907 for trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
- Timestamp:
- 04/04/05 10:18:01 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
r6869 r6907 284 284 void MHNewImagePar::Paint(Option_t *o) 285 285 { 286 if ( TString(o)==(TString)"log" && fHistLeakage1.GetMaximum()>0)287 gPad-> SetLogy();286 if (fHistLeakage1.GetMaximum()>0 && gPad->GetPad(1)) 287 gPad->GetPad(1)->SetLogy(); 288 288 } 289 289 … … 294 294 // together with the canvas. 295 295 // 296 void MHNewImagePar::Draw(Option_t * )296 void MHNewImagePar::Draw(Option_t *o) 297 297 { 298 298 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 301 301 AppendPad(""); 302 302 303 pad->Divide(2,2); 303 // FIXME: If same-option given make two independant y-axis! 304 const TString opt(o); 305 const Bool_t same = opt.Contains("same"); 306 307 if (!same) 308 pad->Divide(2,2); 309 else 310 { 311 fHistLeakage1.SetLineColor(kMagenta); 312 fHistLeakage1.SetLineColor(kCyan); 313 314 fHistCorePix.SetLineColor(kMagenta); 315 fHistUsedPix.SetLineColor(kCyan); 316 317 fHistConc1.SetLineColor(kMagenta); 318 fHistConc.SetLineColor(kCyan); 319 320 fHistCoreArea.SetLineColor(kMagenta); 321 fHistUsedArea.SetLineColor(kCyan); 322 } 304 323 305 324 pad->cd(1); … … 307 326 TAxis &x = *fHistLeakage1.GetXaxis(); 308 327 x.SetRangeUser(0.0, x.GetXmax()); 309 MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2" );328 MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2", same); 310 329 fHistLeakage1.SetMinimum(); 311 330 fHistLeakage2.SetMinimum(); 312 331 fHistLeakage2.SetMaximum(0.1); // dummy value to allow log-scale 313 AppendPad("log");314 332 315 333 pad->cd(2); 316 334 gPad->SetBorderMode(0); 317 MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels" );335 MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels", same); 318 336 319 337 pad->cd(3); 320 338 gPad->SetBorderMode(0); 321 MH::DrawSame(fHistConc1, fHistConc, "Concentrations" );339 MH::DrawSame(fHistConc1, fHistConc, "Concentrations", same); 322 340 323 341 pad->cd(4); 324 342 gPad->SetBorderMode(0); 325 MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels" );343 MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels", same); 326 344 } 327 345
Note:
See TracChangeset
for help on using the changeset viewer.