Delete a bin

Dear Rooters,

Is there way to delete a particular bin entry from a histogram, without effecting the bin width?

Thanks.

[quote=“manoj”]Dear Rooters,

Is there way to delete a particular bin entry from a histogram, without effecting the bin width?

Thanks.[/quote]

How should it work?

  1. What kind of histogram are you talking about ?
  2. “bin entry” and “bin width” are not linked in any ways …
  3. When you fill a TH1F (for instance), the entry will be cumulated with the content of the bin at position x
    so the “entry” by itself will be lost. It will be cumulated with the bin content.

I think you need to clarify what you really mean. With some example may be.

Thanks for the reply.

In my histogram, the points near the lower edge and near the upper edge in x-axis have large error, so I wanted to remove these points. I can re-generate these plots but it takes time. Or I can fill another histogram from this histogram. In both cases I can’t keep the same x-axis range.

I thought there could be some shortcut method to do this.

Thanks,

I found a trick:
set the bin content and error of those bins out of the histogram range.

Yes, that would be the best.