TH1D* histogram = new TH1D("histogram", "Example Histogram", 10, 0, 10); histogram->SetMarkerColor(kRed);
TH1D* histogram = new TH1D("histogram", "Example Histogram", 20, -5, 5); histogram->FillRandom("gaus"); histogram->SetMarkerColor(2);In this example, a new histogram object is created with 20 bins ranging from -5 to 5. The histogram is then filled randomly using the gaussian distribution, and the SetMarkerColor method is called on the histogram object, setting the marker color to blue (2 is the ROOT color index for blue). Package Library: ROOT (CERN)