How to label intervals between axis tick marks?

My data consists of a set of intervals defined by tuples including the boundaries of each interval and identifier for the sides of the interval which are closed. In addition, each interval has a label:

bins=[(0,1,'right'),(1,2,'right'),(2,4,'neither')]
labels=['A', 'B', 'C']

I plot the data as go.Scatter by having the unique boundaries of the intervals as x argument and a numerical function of x as y argument:

x = [0,1,2,4]
y = f(x) , e.g. 2*x

Apart from numeric tick label for each boundary x, I also want to have a second string label for each interval between every two boundaries as identified in β€˜labels’.

A possible approach is to use categorical axis and subcategory for the interval labels. However, first my data is not categorical, and second I really have only 3 labels that describe the intervals between the 4 data points, i.e. point x=1 lies exactly at the boundary of A and B.

Another approach could be to include midpoints for each interval and then label the boundaries with the numerical value and the midpoints with the interval labels via ticktext. However, I dont want my lines to have midpoints which would also interfere with spikes and gridlines and is unwanted behaviour since all I want is to have a second set of labels for the xaxis placed in between the tick marks.

Any clevel way to do this?