Shading parts of a graph

    TMultiGraph *mgBx_z = new TMultiGraph();
    mgBx_z->Add(grarmBx_z,"P");
    mgBx_z->Add(grBxFit3_z, "CP");
    c1->cd(3);
    mgBx_z->Draw("A");
    mgBx_z->GetYaxis()->SetTitle("Bx [mG]");
    mgBx_z->GetYaxis()->SetTitleOffset(1.4);
    mgBx_z->GetYaxis()->CenterTitle();
    mgBx_z->GetXaxis()->SetTitle("z [cm]");
    mgBx_z->GetXaxis()->SetTitleOffset(1.1);
    mgBx_z->GetXaxis()->CenterTitle();

This code segment gives the TMultiGraph below:image
However, I wanted to shade a certain area of the graph light green as well. For this graph, I want to shade all area of the graph between z=-7 and z = 7 in a shade of slightly transparent green. Is there a way to do this?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.