title: Hide Lines from Matplotlib Plot without redrawing them?
body: <p>I have a new issue with matplotlib and 'hiding' lineplots.</p>
  
  <p>I have a wxFrame with a matplotlib plot and an cursor to give values. Works perfectly well.
  In the plot are up to 13 lines and I want to show and hide them using checkboxes, this is working fine, too.</p>
  
  <p>This is my code to 'redraw'
  </p>
  
  <pre><code>def Draw(self, visibility = None):
      self._axes.lines = []
      # if no visibility data, draw all
      if visibility is None:
          visibility = []
          for i in range(len(self._data)):
              visibility.append(True)
      else:
          # check if length match
          if len(self._data) != len(visibility):
              raise AttributeError('Visibility list length does not match plot count')
      # draw the lines you want
      for i in range(len(self._data)):
          if visibility[i]:
              plotName = 'FFD ' + str(i + 1)
              self._axes.plot(self.timebase, self._data[i], picker=5, label = plotName)
      #if there are any lines, draw a legend
      if len(self._axes.lines):
          self._axes.legend(prop={'size':9})
  
      #update the canvas
      self._canvas.draw()
  </code></pre>
  
  <p>But this results in the plot colors changing on every change. How can I have the colors stay? Any good ideas are appreciated (bad ones are also appreciated :) )!</p>