Problem with filling the area TGraph

Hi all,

I am facing a strange problem with filling of TGraph.
I want to fill all the area below the graph.
But it sometimes fill above and sometimes fills below.
This is because of the points going up and down.
For reference, please find my script attached.

How do I correct this?

Thanks,
Shilpi
makeplot.C (513 Bytes)

void makeplot(){
   float mass[12]={200, 220, 240, 260, 280, 310, 340, 370, 400, 440, 490, 550};
   float lim[12] = {10.479,10.739,10.383,9.659,9.724,10.637,10.39,9.301,9.521,9.128,9.081,9.509};
   TGraph *gr1 = new TGraph(12, mass, lim);
   gr1->SetFillColor(2);
   gr1->SetFillStyle(3002);
   gr1->SetLineColor(8);
   gr1->SetLineWidth(-602);
   gr1->Draw("AL");
}

Thanks a lot Couet for looking into it.
With this script, it fills the area just below the line.
I want to fill all of the area below the line:
I am trying to get something like shown in the attached plot.

Best Regards,
Shilpi


You should not used exclusion plot in that case !!!
They are not meant to do this.
You should do:

void makeplot(){
   float mass[12]={200, 220, 240, 260, 280, 310, 340, 370, 400, 440, 490, 550};
   float lim[12] = {10.479,10.739,10.383,9.659,9.724,10.637,10.39,9.301,9.521,9.128,9.081,9.509};
   TGraph *gr1 = new TGraph(12, mass, lim);
   gr1->SetFillColor(2);
   gr1->SetFillStyle(3002);
   gr1->SetLineColor(8);
   gr1->Draw("AF");
}

Hello Couet,

Thanks again.
Please find the plot attached with the code snippet you mentioned in the last mail.
This doesn’t give the shaded region as I shown in the plot in the last mail.

Best Regards,
Shilpi


it is up to you to close properly the graph.