Adding empty plots when altering data in a interative plot
I made a plot that changes the x-axis limits and the tripnumber of my dataset. So the plot is SensorxDistance with some information in the top that’s not relevant right now. The problem is, every time I alter the x-axis or the tripnumber, it plots aditional empty graphs.
Ploted graph
Problem that has occurred
Is there any way of making a line on the top of the plot indicating something (in Python)?
I intend to make a plot of Suspension Travel x Distance of a train, i have a dataset with these information and with information relating if the train is in a straight track or in a curve. I want to mimic the following image, but I have some additional information I have to add (bridge location and tunnel for example). The problem is that what I tried takes almost four minutes to run. Thank you for the help in advance. (I want to add that I am currently using Jupyter Notebook).
Plot I want to copy