title: How to force redraw of a widget after changing some of its attributes?
body: <p>Inside the call-back associated with a  <code>matplotlib.widgets.Slider</code> instance, I want to modify the Slider <code>valmin</code>, <code>valmax</code> and <code>val</code> attributes, and then re-draw the <code>Slider</code>. When I try to re-draw it, nothing happens. </p>
  
  <p>Before the call-back completes, I call <code>plt.draw()</code> and, while the rest of the plot is correctly updated, the <code>Slider</code> looks the same as before. I also tried calling <code>draw()</code> on the <code>Axes</code> of the <code>Slider</code>, and again no visible change.</p>
  
  <p>How can I force a re-draw of the <code>Slider</code> instance after changing its attributes?</p>
  
  <p>Thansk!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here a small program that demonstrates the issue (with a crude dialog). The wanted behavior is that by clicking on a different value of the radio button, the slider changes range of values, current value and label. What happens instead is that when clicking on "Gradient" the slider stops responding (cannot be dragged anymore), and when clicking on "Gradient" or "Channel" the slider is not updated, in spite of a call to <code>plt.draw()</code></p>
  
  <pre><code>from matplotlib import pyplot as plt
  from matplotlib import gridspec
  from matplotlib.widgets import Slider, RadioButtons
  
  # Set the grid
  grid = gridspec.GridSpec(2, 1, height_ratios=[1, 2])
  
  # Plot the sliders
  axes_slider = plt.subplot(grid[0, 0])
  slider = Slider(axes_slider, 'Channel', valmin=0, valmax=255, valinit=128)
  
  # Plot the radio buttons
  axes_button = plt.subplot(grid[1, 0])
  button = RadioButtons(axes_button, ('Gradient', 'Channel'), active=1)
  
  plt.tight_layout(h_pad=0)
  plt.subplots_adjust(left=.2, right=.9)
  
  def update(_):
      take_gradient = True if button.value_selected == 'Gradient' else False
      if take_gradient:
          slider.valmin = -1
          slider.valmax = 1
          slider.val = 0
          slider.label= 'Gradient'
          slider.valinit = 0
      else:
          slider.valmin = 0
          slider.valmax = 255
          slider.val = 128
          slider.label = 'Channel'
          slider.valinit = 128
      plt.draw()
  
  # Register call-backs with widgets
  slider.on_changed(update)
  button.on_clicked(update)
  
  plt.show()
  </code></pre>