Binning and using the start of the bin

I’d like to make a cumulative frequency chart, showing “count of things having value greater than or equal to xxxx”, where xxxx is a calculated or supplied set of thresholds.

The binX seems to be the way to do this, but the x value is, I think, the centre of the bin… I’d like it to be the start. I think this would more accurately convey what I’m trying to say.

Here is an example of the current chart.

Or perhaps I just made a dumb error. Anyhow the code can easily be seen in “view source”.

Thanks for any suggestions!!!

The edges of a bin should be available as x1 and x2.

Hi Fil - thank you for such a quick reply.

I did see that mentioned in some docs… but I wasn’t sure what to do with that knowledge. I think maybe I’m missing a concept.

Does it mean simply using ‘x1’ or x2 instead of ‘x’ in the Plot.binX call?

Plot.line(                                                                      data,
                        Plot.binX(                                                                      {y: "count"},
                                {                                                                           thresholds: [...],

                                    z: "company_name",                                                      cumulative: -1,
                                    x: "total_hours",     

I can help if you isolate the chart into a notebook, for example, but it’s too much work to reproduce the use case.