ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
Hi Everyone,
I have two graphs. I am not being able to draw the graph like the attached image. I want to draw the points in such a way that I can distinct them.
I am using the following commands.
‘’’
gr->SetLineColor(2);
gr->SetLineWidth(4);
gr->SetMarkerColor(8);
gr->SetMarkerSize(4);
gr->SetMarkerStyle(28);
{
auto gr = new TGraph();
gr->SetPoint(0,250.,270.);
gr->SetPoint(1,500.,275.);
gr->SetPoint(2,900.,250.);
gr->SetMarkerColor(kBlue);
gr->SetMarkerStyle(kFullCircle);
auto gr1 = new TGraph();
gr1->SetPoint(0,250.,390.);
gr1->SetPoint(1,500.,460.);
gr1->SetPoint(2,900.,420.);
gr1->SetMarkerColor(kRed);
gr1->SetMarkerStyle(kFullCircle);
auto mg = new TMultiGraph();
mg->Add(gr);
mg->Add(gr1);
mg->Draw("AP");
}
Hi Otto,
Yes I saw that too. But the example posted and the question was about TGraph. That’s why I produced a working example using TGraph. @souvik may come with more details.
Cheers,
Olivier