Markers and colors

i wanted different markers and colors for two different plots from two TGraph’s in a canvas. please help :slight_smile:

 gPad->SetLogy(1);

 av1->SetMarkerStyle(7);
 av1->SetMarkerColor(kBlue);
 av1->SetMarkerSize(1);

 av2->SetMarkerStyle(6);
 av2->SetMarkerColor(kRed);
 av2->SetMarkerSize(1);

 TMultiGraph *mgp = new TMultiGraph();
 mgp->SetTitle("ep scattering (dcs) point vs finite; Transfer Momentum in GeV^2; Differential Cross Section");
 mgp->SetMinimum(1.e-6);
 mgp->SetMaximum(1.e0);
 mgp->Add(av1);
 mgp->Add(av2);
 mgp->Draw("a");

 avf->SetMaximum(1.e0);
 can->Modified();
 can->Update();
 mgp->Add(av1,"P");
 mgp->Add(av2,"P");

gracias @couet :slight_smile:

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