Hi everybody,
I would like to draw 2 TGraph2D objects together, for example create 6 red points (markers) plus another set of n blue points. I tried using the draw option “same” or “P” but it didn’t work, can you help me.
Thank you very much.
[code]TGraph2D *g1 = new TGraph2D(3);
TGraph2D *g2 = new TGraph2D(3);
g1->SetPoint(0,1,0,0);
g1->SetPoint(1,0,1,0);
g1->SetPoint(2,0,0,1);
g2->SetPoint(3,-1,0,0);
g2->SetPoint(4,0,-1,0);
g2->SetPoint(5,0,0,-1);
g1->SetMarkerStyle(20);
g1->SetMarkerColor(kBlue);
g1->SetMarkerSize(1.5);
g2->SetMarkerStyle(20);
g2->SetMarkerColor(kRed);
g2->SetMarkerSize(1.5);
g1->Draw("P");
g2->Draw("same");[/code]