0

I am using a matplotlib.widgets slider and it's working perfectly but there is a little red line that marks the initial value of the slider that I would like to remove. I checked the documentation for the Slider function and there was a mention of something called a vline or hline which I think is what I'm looking to remove but it doesn't say anywhere how to remove that line. Here is what I'm referring to.

And here is the code I have for showing the slider:

amp_slider = Slider(ax=axamp, label='Amplitude', valmin=0, valmax=10, valinit=init_amplitude, orientation='vertical')

1 Answers1

0

This worked for me:

amp_slider.hline._linewidth = 0

To find it, I just printed the elements of some_slider.hline.__dict__.keys(). For a horizontal slider (default), it would be the vline that needs to be adjusted.