Graphing binary sensor activity grouped by time increments to create a graph?

Can anyone point me to something that can help accomplish graphing binary sensor activity in more of a sensor-type graph?

Use case - my downstairs motion sensor. It’s triggered constantly by the daily goings on. I’d like to be able to see those triggers added and grouped over say a 5 minute period to get an x,y sort of graph. Same thing with the door sensor I’ve put on my fridge.

Any suggestions?
Thank you!

What exactly do you want to plot on the x and y axes?

Something like this?

x: time, in whatever increments
y: # of occurrences where state changes to ‘on’ within that timespan.

Grafana can do that.