vertical colored lines on a slider matplotlib
The Slider resides in barpos
, not in self.ax
.
If you call self.ax.axvline(..)
, the axvline will be inside self.ax
which is the subplots with the bars. If you want to have the axvlines in the Slider axes, you need to call barpos.axvline()
. Better make barpos a class variable as well and then call
self.barpos.axvline()