Changeset 5994 for trunk/MagicSoft/Mars/mimage/MHImagePar.cc
- Timestamp:
- 01/25/05 14:47:59 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHImagePar.cc
r5142 r5994 136 136 void MHImagePar::Paint(Option_t *o) 137 137 { 138 if (TString(o)==(TString)"log1" && fHistSatHi.GetMaximum()>0) 139 gPad->SetLogy(); 140 if (TString(o)==(TString)"log2" && fHistIslands.GetMaximum()>0) 141 gPad->SetLogy(); 138 /* 139 if (TString(o)==(TString)"log1" && fHistSatHi.GetMaximum()>0) 140 gPad->SetLogy(); 141 if (TString(o)==(TString)"log2" && fHistIslands.GetMaximum()>0) 142 gPad->SetLogy(); 143 */ 144 if (fHistSatHi.GetMaximum()>0 && gPad->GetPad(1)) 145 gPad->GetPad(1)->SetLogy(); 146 if (fHistIslands.GetMaximum()>0 && gPad->GetPad(2)) 147 gPad->GetPad(2)->SetLogy(); 142 148 } 143 149 … … 148 154 // together with the canvas. 149 155 // 150 void MHImagePar::Draw(Option_t * )156 void MHImagePar::Draw(Option_t *o) 151 157 { 152 158 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 155 161 AppendPad(""); 156 162 157 pad->Divide(1,2); 158 159 pad->cd(1); 160 gPad->SetBorderMode(0); 161 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 162 fHistSatHi.SetMinimum(); // switch off to allow log-scale 163 fHistSatLo.SetMinimum(); // switch off to allow log-scale 164 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 165 AppendPad("log1"); 163 TString opt(o); 164 opt.ToLower(); 165 166 // FIXME: If same-option given make two independant y-axis! 167 const Bool_t same = opt.Contains("same"); 168 169 if (!same) 170 pad->Divide(1,2); 171 else 172 fHistIslands.SetLineColor(kGreen); 173 174 if (!same) 175 { 176 pad->cd(1); 177 gPad->SetBorderMode(0); 178 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 179 fHistSatHi.SetMinimum(); // switch off to allow log-scale 180 fHistSatLo.SetMinimum(); // switch off to allow log-scale 181 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 182 //AppendPad("log1"); 183 } 166 184 167 185 pad->cd(2); 168 186 gPad->SetBorderMode(0); 169 fHistIslands.Draw( );170 AppendPad("log2");187 fHistIslands.Draw(same?"same":""); 188 //AppendPad("log2"); 171 189 } 172 190
Note:
See TracChangeset
for help on using the changeset viewer.