Sorry for the bad question name.

I have a set of data in a CSV that contains time ranges (nanoseconds since epoch) like so

```
StartTimestamp,EndTimestamp
284473439207159,284473441207159
284473458747908,284473460285908
284473480805406,284473481909406
284473502295963,284473504295963
284473524525589,284473526079589
284473546781808,284473547889808

```

These represent the time a signal was on.

I'd like to create a graph that is a square wave, where X is time (from the first start to the last end) and f(X)={1 if X is in one of the ranges in the data set, 0 if it is not)

Example:
Given the set

```
0,1
3,5
9,10

```

I'd like to see this

[![enter image description here](https://i.stack.imgur.com/dBGOQ.png)](https://i.stack.imgur.com/dBGOQ.png)

Any suggestions? Without generating the 0 values, I cannot figure this one out.