Draw both histogram line and marker

In this example:

  TH1F *h = new TH1F("h", "h", 5, 0, 5);
  h -> FillRandom("gaus", 500);
  h -> SetMarkerStyle(kOpenTriangleUp);
  TCanvas *c = new TCanvas;
  h -> Draw("HISTOP");

I would like the histogram to be drawn using both the marker and the line (no error bars). How can I achieve that?

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

h->Draw("HIST"); h->Draw("HIST P SAME");

1 Like

I add h to THStack. What should I do?

The same should also work for the whole stack (with and without “NOSTACK” in both statements).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.