With your version you have to make to something like
h->Draw("hist");
TF1 *func = h->GetFunction("myfunc"); // where myfunc is "gaus","expo",'etc
func->Draw("same");
I will modify the meaning of the existing option "e0" (I do not think that
many people use it, tell me otherwise), such that:
if h has error bars (by Sumw2 or SetBinError)
h->Draw(); //draw error bars only (+ associated fit if there is one)
h->Draw("hist"); will show only the histogram contour (as now)
h->Draw("func"); will show only the associated function (as now)
h->Draw("e0"); will not show the error bars and will show the contour
and the function.
Rene Brun
Bertalan Juhasz wrote:
>
> On Wed, 6 Sep 2000, Rene Brun wrote:
>
> > Hi Bertalan,
> > use option "e1h"
>
> Thank you, it is better, but is there any way to get rid of the error bars
> completely?
>
> Bertalan
>
> >
> > Rene Brun
> >
> > Bertalan Juhasz wrote:
> > >
> > > Hello Rooters,
> > >
> > > I have a 1D histogram with errors of each bin set via TH1::SetBinError().
> > > If I fit this histo, it is drawn with error bars only and without the
> > > histo contours. If I use the "HIST" option to force ROOT to draw the
> > > contours, the fitted function is not drawn. Of course, I can draw the
> > > fitted function later to the same pad via TF1::Draw("SAME") but in this
> > > case I cannot modify the "x" axis range afterwards either using the
> > > pop-up menu -> SetRange (nothing happens if I do so) or dragging the range
> > > with the mouse (in this case only the drawing range of the fitted function
> > > is modified but not that of the histogram). Any suggestions on how to
> > >
> > > 1) draw a histo with contours & the fitted function if the bin errors have
> > > been set via SetBinError()
> > >
> > > AND
> > >
> > > 2) modify the axis ranges afterwards WITHOUT a macro/prompt line command
> > > i.e. dragging the axis ranges by mouse.
> > >
> > > Thanks a lot,
> > >
> > > Bertalan
> >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET