Hello,
I’m not sure how to plot the colors of my lines in a TLegend by using the GUI or any member functions. Does anyone have any code snippits? I can do this in root with something like:
leg = new TLegend(0.4,0.6,0.89,0.89);
leg->AddEntry(hgamma1PCms_signalhist,“Signal”,“l”);
leg->AddEntry(hgamma1PCms_udshist,“uds”,“f”);
leg->Draw()
however when I make even if I explicitly make an object and plot he lines corresponding to different components of the fit:
RooChebychev *polyBg = new RooChebychev(“polyBg”, “polyBg”, d0Mass, coefLs)
…
totalD0MassPdf.plotOn(pAll_D0Mass);
totalD0MassPdf.plotOn(pAll_D0Mass,Components(RooArgList(*polyBg,cbPP_D0Mass)) , LineStyle(kDashed), LineColor(kMagenta));
totalD0MassPdf.plotOn(pAll_D0Mass,Components(RooArgList(*polyBg)) , LineStyle(kDashed), LineColor(kRed));
however I cant add theses lines/color to the TLegend. What’s going on?
james