# Get curve outline when fill area overlap in graph

**URL:** <https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576>\
**Category:** Newbie\
**Created:** [April 13, 2022, 2:55pm UTC](https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576 "2022-04-13T14:55:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gorsedh](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gorsedh/32/25831_2.png) [@gorsedh](https://root-forum.cern.ch/u/gorsedh)\
**Post date:** [April 13, 2022, 2:55pm UTC](https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576/1 "2022-04-13T14:55:51Z")

</div>

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

```auto
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"));
  }

```

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/f/9/f9b4133bc72c8828477690fd6a44e986a43a5d4e.png)

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Dilicus](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dilicus/32/14338_2.png) [@Dilicus](https://root-forum.cern.ch/u/Dilicus)\
**Post date:** [April 13, 2022, 5:53pm UTC](https://root-forum.cern.ch/t/get-curve-outline-when-fill-area-overlap-in-graph/49576/2 "2022-04-13T17:53:05Z")

</div>

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
