[RooFit plotOn] Function Invisible(true) is not defined

Hello,

I just want to add a curve to frame, but do not display it, as it says on:
http://root.cern.ch/root/html/RooTreeData.html#RooTreeData:plotOn

and from page:
http://root.cern.ch/root/html/src/RooTreeData.cxx.html#ozD1J

It seems “Invisble” should be “Invisible”. But the following test code doesn’t work. Could you please give me a hand here? I am using RooFit v2.95 in ROOT 5.23.01.

BTW: I want to use this method to draw RooDataSet as histogram.

Thanks a lot.

[code]void testInvisible(){

using namespace RooFit;

RooRealVar *x = new RooRealVar(“x”, “x”, -10.0, 10.0);
RooRealVar *gauMean = new RooRealVar( “gauMean” , “mean” , .0 , -5.0, 5.0 );
RooRealVar *gauSigma = new RooRealVar( “gauSigma”, “sigma” , 2.0, 0.1, 3.0 );

RooAbsPdf *gaus = new RooGaussian(“gaus”, “gaus”, *x, *gauMean, *gauSigma ) ;

RooDataSet *testData = gaus->generate(RooArgSet(*x),Verbose(false),NumEvents(1000));

gaus->fitTo(*testData);

RooPlot* xframe = x->frame();

testData->plotOn(xframe, Invisible( true ) );
gaus->plotOn(xframe);
xframe->Draw();

}[/code]

Hi,

The Invisible() option takes no arguments, this is a mistake in the online documentation (will fix this). If you give it without arguments it will work.

Wouter