Graph color transparency

Hi,

I have three graphs (of disk like shapes, and different color) on same frame, and some part of them overlap each other. How can I make the overlap the regions transparent (like 10% transparent) so that all three graphs can be visible?

Thanks.

The transparency is not yet available for filled area.
You should use some hatches of fill style allowing to see the graph behind.
To choose the best combination for your case, the best is to enter the Editor:

In the TCanvas: View->Editor then you click on the TGraph you want to modify.
You will see on the left the possible fill style. try them.

Then do: File->Save and save the canvas as a .C file you will then see in the C file how to set the fill style in a macro (SetFillStyle)

Thanks couet, I will give a try.

Hello. Just checking: is transparency still not available for TGraphs, without opening the editor?

It is available:

void transgraph(){

   int nPnt = 100;
   vector<double> x, Y1, Y2;

   double xMin = -3.1415, xMax = 3.1415, dX = (xMax-xMin)/(nPnt-1), xCur = xMin;

   for (int jPnt = 0; jPnt < nPnt; ++jPnt, xCur += dX) {
      x.push_back(xCur);
      Y1.push_back(sin(xCur));
      Y2.push_back(cos(xCur));
   }
   TGraph *g1 = new TGraph(nPnt, &(x[0]), &(Y1[0]));
   TGraph *g2 = new TGraph(nPnt, &(x[0]), &(Y2[0]));
   g1->SetFillColorAlpha(kRed,0.5);
   g1->Draw("AF");
   g2->SetFillColorAlpha(kBlue,0.5);
   g2->Draw("F");
}

Thanks very much @couet.