How to set default marker style of TGraph when drawing on canvas?

Hello,

I want to change the default marker style of TGraph when drawing on the TCanvas.

I tried gStyle->SetMarkerStyle(3) before generating a canvas, but it didn’t work…

Is there some methods?

Cheers,
Youngju

Hi,

check this out: SetMarker globally?

Welcome to the ROOT forum.

void graph() {
   gStyle->SetMarkerStyle(kFullCircle);

   auto gr = new TGraph();
   for (int i=0; i<20; i++) gr->AddPoint(i*0.1, 10*sin(i*0.1+0.2));

   gr->Draw("ACP");
}

Thanks for your help, but
typing belows lines on the interpreter doesn’t change the markerstyle when I draw new graph using toolbar.
gStyle->SetMarkerStyle(20);
gStyle->SetMarkerSize(0.25);
gROOT->ForceStyle();

Thanks for your help, but what I wanted was change the default marker style when I draw the graph using Toolbar (Click the mouse on the Canvas).

Oh, I see ! The toolbar is just a toy graphics editor. There is no setting for that.