Graphing in the COLZ option how to change marker size?

I am trying to graph PMTs with the “COLZ” option, but the marker sizes are extremely small and cannot get it to change.

auto pmtposition = new TH2D("Centroid Calculation","Centroid and True Vertex",200,0,500,200,-200,200);
    auto canvas1 = new TCanvas("PMT POSITIONS","PMT POSITIONS",900,900);
    std::map<int,std::tuple<double, double, double, int, int>>::iterator it;
    for(int i = 0 ; i < ch_ID[event].size();i++){
        auto it = PMT_dict.find(ch_ID[event][i]);
        if (it != PMT_dict.end()){
            if((std::get<4>(it->second)==tpc)&&(ch_promptPE[event][i] >= 0)){
                auto value = it->second;
                pmtposition->Fill(std::get<2>(value),std::get<1>(value),ch_promptPE[event][i]);
            }
        }
    }
    pmtposition->SetMarkerSize(5);
    pmtposition->Draw("colz");
1 Like

You can change the bin width by modifying your first line of code:

200,0,500,200,-200,200)

Alternatively, use the TScatter class. ROOT: TScatter Class Reference

1 Like

The COLZ option does not draw any marker. Have a look to the documentation.

1 Like