I am a newbie to python and am trying to plot a graph for some frame ids, the frame ids can vary from just about 10 in number to 600 or above in number. Currently, I have this and it works and displays 37 ids together but if I have suppose 500 ids, it clutters them and overlaps the text data. I want to be able to create it in such a way that in one go I only display first 20 ids and there is a scroll bar that displays the next 20 ids and so on.. My code so far:
import matplotlib.pyplot as plt;
import numpy as np
fig,ax=plt.subplots(figsize=(100,2))
x=range(1,38)
y=[1]*len(x)
plt.bar(x,y,width=0.7,align='edge',color='green',ecolor='black')
for i,txt in enumerate(x):
ax.annotate(txt, (x[i],y[i]))
current=plt.gca()
current.axes.xaxis.set_ticks([])
current.axes.yaxis.set_ticks([])
plt.show()
and my output:
enter image description here