What object to use when x-axis is several million bins long


I am wondering what would be the correct object (histogram, graph…?) to use if I want to display one entry (y-axis) for each x-value - when the x-value can be as high as 20Mill ? It seems that the histogram would become very very large if I require 20 mill bins??

Typically this is a sort of measurement done per event in a long run.

Sorry if the question is silly, or the answer is obvious…



If you have very few entries for each point (bin) , the best class to use is TH1C (one char/bin ), where you store an array of doubles for the axis and an array of char for the bin contents. For 20 millions, should be something like 200 MB of memory.