The styles change when the canvas is clicked. And, the 1st one and last one always have the same color?
Also, the histograms are not visible on the Canvas if I use opt=’’.
I’m not sure if this is due to my configuration. Any thing obviously wrong in this code? Thanks!
{
auto *c = new TCanvas("c","c",800,600);
auto *h1 = new TH1F("h1","h1",50,-10,10);
auto *h2 = new TH1F("h2","h2",50,-10,10);
auto *h3 = new TH1F("h3","h3",50,-10,10);
auto *h4 = new TH1F("h4","h4",50,-10,10);
h1->FillRandom("gaus",1500);
h2->FillRandom("gaus",1000);
h3->FillRandom("gaus",500);
h4->FillRandom("gaus",200);
h2->SetMarkerStyle(20);
h1->SetMarkerStyle(25);
h3->SetMarkerStyle(26);
h1->Draw("E PLC PMC");
h2->Draw("E SAME PLC PMC");
h3->Draw("E SAME PLC PMC");
h4->Draw("SAME");
c->Update();
c->BuildLegend();
c->Update();
}