RooPlot - no axes, no frame

I’m looking to draw a curve imported from a workspace essentially on a bare canvas. I know this is possible in base root, but the altered plotting in RooFit is giving me trouble. That means I’d like the frame, ticks, labels preferably not drawn.

Post.C (760 Bytes)
Post.root (7.6 KB)

I have a basic macro with a workspace here.

Hello,

Thanks for the post. Adding @jonas in the loop.

Cheers,
D

Hi @usccaa, thanks for also sharing your code!

RooFit plotting does quite a few things implicitly and enforces a specific style. I would recommend you do your plot with base ROOT, exporting your RooFit model to a TF1 and then plot that one:

  TF1 *modelFunc = model->asTF(/*obs=*/ *x, /*pars=*/ {}, /*nset=*/ *x);

The “nset” (normalization set) is important to specify to make the pdf correctly normalized.

If you want to plot RooFit datasets, you can do a similar trick using RooAbsData::createHistogram() to get a TH1.

I hope that helps!

Cheers,
Jonas

Right. I sometimes forget just going back to base Root is a possibility. I call out the answer myself.

Thanks!