0

I am a beginner and I just added a slider to my plot using matplotlib slider. By use of

vline.set_xdata([0,0])

I could place a vertical line on the slider, but I wonder if there is any way to put several vertical lines? and also is it possible to label the value for them?

  • You need to think about what kind of interaction you would envision with two or more lines, i.e. if you click on the slider, which of the several lines is going to move? I implemented a slider with two values in [this answer](https://stackoverflow.com/questions/47353014/prevent-data-overlap-between-two-sliders-use-a-single-slider-for-two-quantitie/47368270#47368270). Can you check in how far this is, or is not what you need? – ImportanceOfBeingErnest Mar 19 '19 at 12:42
  • Thanks for the reply. My slider is just a progress bar and is not clickable. My plot keeps updating, and the slider shows the progress (loading). I want to put markers on values like 50% and 75%. – mary valian Mar 20 '19 at 13:47
  • You do not need a slider for that, right? Maybe, it would be easier to use a normal axes without slider where you find all the details about setting ticks and labels as well creating lines. Alternatively, if you can provide me with a [mcve], I can help you adapt it do your needs. – ImportanceOfBeingErnest Mar 20 '19 at 14:34

0 Answers0