I have made profile histogram from 2D histogram. Now if i am trying to draw it:
It draws the line and the marker through the whole X range of the histogram including empty bins at the end. Like this: home.fnal.gov/~hits/post.gif
However, if I use:
It draws only marker for the filled bins but does not connect them with the line.
Like this: home.fnal.gov/~hits/post1.gif
My goal is to conect markers with the line bur ignore empty bins at the end.
can somebody please tell me what I am not doing?
To draw the errors AND the line you should do 2 passes:
Thanks! It did work with the slight modification!
hist11->Draw("HIST L SAME"); [/quote]
However, it still draws the line through the zero bins at the end. (see home.fnal.gov/~hits/example2.gif )
Can you help get rid of it?
You got this line because your data are stored in an histogram. Therefore with option line L, C etc … all the bins are drawn, even the empty ones. To draw only a line through the few points you have, the simplest would be to use a TGraph and draw it on top of the histogram using option L. Do you know how to put these few points in a TGraph ?
Also, an other simple solution could be to set the histogram minimum to 0.