Skip "n" symbols while drawing histogram

dear experts:

I have a naive question, more about aesthetics when painting objects (histograms or functions) than coding, I think.

Suppose you paint a histogram with the option “lp” (line + point) but the histogram binning is quite dense making markers overlap with its neighbor, therefore one ends with a thick line. is it there any trick to skip “n” markers from appearing in the plot while keeping the whole drawn line intact?

thanks in advance,

I think your can easily re-bin your histogram.
Or you can convert it into a TGraph; then you should be be able to remove some points.

[quote=“pincho”]dear experts:

I have a naive question, more about aesthetics when painting objects (histograms or functions) than coding, I think.

Suppose you paint a histogram with the option “lp” (line + point) but the histogram binning is quite dense making markers overlap with its neighbor, therefore one ends with a thick line. is it there any trick to skip “n” markers from appearing in the plot while keeping the whole drawn line intact?

thanks in advance,[/quote]

hi ntomasse:

actually I came with a solution like the first you wrote

copy = (TH1F*)((list->At(iDecay)))->Clone();
copy->Rebin(kRebin);
copy->Scale(1./kRebin);
copy->SetMarkerSize(0.8);
copy->DrawCopy(“p”);
((TH1F*)list->At(iDecay))->DrawCopy(“lsame”);

However, it requires your base histogram to be quite smooth, any peak in the original distribution can distort the visualization of the markers around that segment. Yet it is simpler than the TGraph solution, which I’ll try any way.

Best regards,

If the markers are that dense may be you should simple not draw them.
You can also try to make them smaller.