Bokeh Figure with ypan functionality with labels

Hello,
I am new to this community and new to using Bokeh. I am currently using it to view multiple sequences by following this tutorial. Link: Bioinformatics and other bits - A sequence alignment viewer with Bokeh and Panel. Currently, as the tutorial stands, there is no functionality to only show a certain number of sequences at a time and then to scroll along the vertical axis to view the others. I have over 50 sequences, thus being able to scroll along the y axis would be very very helpful. Please let me know what your suggestions are.
Thank you,
Jeffy

There is not presently any way to do this with a categorical range. Axes for categorical ranges simply show all the factors in the order the were provided. Your best bet would be to use something like an integer index in place of all the factors. Then you can use a standard numerical axis with all the additional control that implies (e.g. setting start and end values). For the axis labels you could use a customjs tick formatter or tick label overrides to display the factor names instead of the index.

1 Like