Get curve outline when fill area overlap in graph

Hello there,

I’m drawing some curves on a histogram and i want some areas filled but in some cases they overlap. Is there a way to get the outline of the covered curve to superimpose on the fill area? (for example, in the picture, the green curve on the blue and the purple one, the blue curve on the purple one).

I’m currently drawing the lines like this

RooPlot * plotPK = mass->frame(5.2,6.2,100);
  data->plotOn(plotPK);
  tot_pk->plotOn(plotPK,Name("Segnale"),Components(*sig_pk), LineColor(kBlack), LineStyle(1));
  tot_pk->plotOn(plotPK,Name("Combinatorio"),Components(*bkg_pk), LineColor(kRed), LineStyle(3));
  tot_pk->plotOn(plotPK,Name("Argus"),Components(*argusLb_pk), LineColor(kGreen), LineStyle(3));
  if(channel == "pk"){
    tot_pk->plotOn(plotPK,Name("bdpik"),Components(*model_bdpik), LineColor(kBlue), FillColor(kBlue), DrawOption("F"));
    tot_pk->plotOn(plotPK,Name("bskk"),Components(*model_bskk), LineColor(kViolet), FillColor(kViolet), DrawOption("F"));
    tot_pk->plotOn(plotPK,Name("crossfeedppi"),Components(*model_lbppi), LineColor(kRed), FillColor(kRed), DrawOption("F"));
  }
  if(channel == "ppi"){
    tot_pk->plotOn(plotPK,Name("bdkpi"),Components(*model_bdkpi), LineColor(kBlue), FillColor(kBlue), DrawOption("F"));
    tot_pk->plotOn(plotPK,Name("bdpipi"),Components(*model_bdpipi), LineColor(kViolet), FillColor(kViolet), DrawOption("F"));
    tot_pk->plotOn(plotPK,Name("crossfeedpk"),Components(*model_lbpk), LineColor(kRed), FillColor(kRed), DrawOption("F"));
  }

Thanks in advance

Hi,
the only way that came to my mind, it is to draw the green and blue curve again at the end of your code, but with option "L" instead of option "F"

Best,
S

1 Like