X-axis marker position in profile plot

Hi,

I was wondering if there exists a way to draw a profile plot with the markers on the mean x-value of a bin.

If I do
root [0] TProfile *p = new TProfile(“p”,“p”,5,0,20,0,2)
root [1] p->Fill(1,0.5)
root [2] p->Fill(1,0.5)
root [3] p->Fill(1,0.6)
root [4] p->Fill(1,0.8)
root [5] p->Fill(1,1.0)
root [6] p->Draw()
I get as x-value of the marker 2 instead of 1.

Thanks in advance!
Jan

The error bar is drawn in the middle of the bin. You can achieve what you want by choosing the right number of bins. Try:

{
 TProfile *p = new TProfile("p","p",10,0,20,0,2);  
 p->Fill(1,0.5);
 p->Fill(1,0.5);
 p->Fill(1,0.6);
 p->Fill(1,0.8);
 p->Fill(1,1.0);
 p->Draw() ;
}