Black Lives Matter. Please consider donating to Black Girls Code today.

Use lines of varying lengths as scatter marker

I’m plotting timeslots from some kind of scheduler. Every timeslot has a start and an end. I want to plot a line for every timeslot length.

My naive approach was to create a new trace for every timeslot. This works, but as I get tens of thousands of slots, if not hundreds, my machine tried to take off and fails plotting for several minutes.

Is there a more efficient way to plot many timeslots? I was thinking of misusing error bars, or something in that style…

Hi @gauthier, I’m trying to do what you were doing here which is to draw lines for small timeslots with a start & end. Did you find a solution that didn’t involve creating a new trace for every timeslot? If so could you share it please?


Hi, sorry, no other solution than one trace per slot.