It is necessary to build a special type of histogram. I know that there is a hist function for this, but I don’t know exactly how to apply it in this case.

The data is presented in the following form in the file:

 3 0 0.25 0.35 0.45 5 0.45 0.65 4 0.65 0.68 0.69 0.70 ... 

The first column shows how often the value falls into a set of intervals. The set of intervals is represented by columns 2-... (i.e. there can be an arbitrary number). So, the first line means "in the set of intervals {[0; 0.25], [0.35; 0.45)} 3 values ​​fall. All data is presented correctly, i.e. the first point of the first interval in a set of intervals is the last point in the last interval of the previous set of intervals, intervals go sequentially, etc. However, in a set of intervals, intervals, although correctly located relative to each other, are discontinuous (i.e., the first point of the interval ! = last point of the previous one).

Inclusions for sets of intervals: [_), [_), ..., [_), [_] . Inclusions for intervals within a set of intervals [_], [_], ..., [_], [_) , if the set of intervals is not the last. And if the last set of intervals, then the inclusion of intervals in it [_], ..., [_] .

How to display it on a histogram so that x sets up intervals, and y sets frequencies?

  • If the distribution between the subintervals is unknown, then it is necessary for the first set to draw two columns of equal height 3, and between them there is emptiness, right? - MBo
  • one
    @MBo need to make it clear that this is one set of intervals. I don’t know, I can make 2 columns of the same height in different colors, but it’s better to make one column with the signature below {[0; 0.25], [0.35; 0.45)} {[0; 0.25], [0.35; 0.45)} {[0; 0.25], [0.35; 0.45)} and continue on to x starting at 0.45 - christ
  • @MBo width stobikov not important, they may not correspond to the sum of the lengths of the intervals, the main thing - that it was clear that in such a set of intervals such a frequency - Christ
  • Maybe the bars are the same color, the gaps between the bars of the same set are the same pale color. Actually, it is not very clear whether the presentation of these voids to the user makes sense. - MBo
  • @MBo I don’t know, but I definitely don’t: 1) take the first point of the first interval and the last one in the set of intervals, confusing the user that there are no gaps; 2) make a histogram for subintervals, without in any way showing that the subintervals belong to the same set. It would be cool if you showed a few possible options - christ

1 answer 1

I would do that. Would show a pale or translucent fill - columns at intervals of intervals, and bright, as if against the background of the first - columns at intervals. Then all the real information that you have would become available to the user - both about interval unification and the presence of intervals with zero hit points.