Skip to content
Snippets Groups Projects
Commit bafa0752 authored by Olivier Couet's avatar Olivier Couet
Browse files

TGraphPainter

git-svn-id: http://root.cern.ch/svn/root/trunk@44360 27541ba8-7e3a-0410-8455-c3a389f83636
parent a32d3a72
No related branches found
No related tags found
No related merge requests found
...@@ -13,3 +13,38 @@ if all the bins' contents are positive some empty bins might be painted. And vic ...@@ -13,3 +13,38 @@ if all the bins' contents are positive some empty bins might be painted. And vic
if some bins have a negative content some empty bins might be not painted. if some bins have a negative content some empty bins might be not painted.
</li> </li>
</ul> </ul>
<h3>TGraphPainter</h3>
<ul>
<li>
Fix http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=8591.
<br>
When drawn with option SAME the histogram 1st and last bins might be wrong.
The following macro shows the problem:
<pre>
{
TCanvas *c = new TCanvas("c","c",900,900);
c->Divide (1,2);
TH1D * histo1 = new TH1D ("histo1","histo1",100,0.,100.) ;
histo1->SetBinContent(51,80.) ;
TH1D * histo2 = new TH1D ("histo2","histo2",100,49.9,51.1) ; /// not ok
histo2->SetMinimum(0.) ; histo2->SetMaximum(100.) ;
c->cd(1); gPad->DrawFrame(49.9, 0., 51.1, 100);
histo1->Draw("same");
Double_t xAxis[4] = {3., 5., 7., 9.};
TH1D *histo2 = new TH1D("histo","",3, xAxis);
histo2->SetBinContent(1,2.);
histo2->SetBinContent(2,4.);
histo2->SetBinContent(3,3.);
c->cd(2); gPad->DrawFrame(4.,0., 10.,5.);
histo2->Draw("same");
}
</pre>
</li>
</ul>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment