Alright, I found one way to do it, that looks relatively clean: (using the ColorBar
object from the question)
color_bar.set_alpha(1)
color_bar.draw_all()
# pylab.draw() or pyplot.draw() might be necessary
It would be great to get a confirmation that this is the most robust way to proceed, though! :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…