title: matplotlib setting axes, panning and zooming controls
body: <p>I am using wx along with matplotlib, creating a simple scatter plot</p>
  
  <pre><code>#!/usr/bin/python
  # example.py
  
  import matplotlib
  matplotlib.use('WXAgg')
  from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
  from matplotlib.figure import Figure
  
  import wx
  
  
  x = [1,2]
  y = [1,2]
  
  class MainFrame(wx.Frame):
      def __init__(self, parent, title):
          super(MainFrame, self).__init__(parent, title=title, size = (600,300))
          self.CreatePanel()
          self.Show()
  
  
  
      def CreatePanel(self):
          self.mainpanel = wx.Panel(self,style=wx.RAISED_BORDER)
  
          self.mainpanel.fig = Figure(figsize=(1,1))
          self.mainpanel.a = self.mainpanel.fig.add_subplot(111)
          self.mainpanel.b = self.mainpanel.a.scatter(x,y)
  
          self.mainpanel.canvas = FigureCanvasWxAgg(self.mainpanel, -1, self.mainpanel.fig)
  
          self.mainpanel.sizer = wx.BoxSizer(wx.HORIZONTAL)
          self.mainpanel.sizer.Add(self.mainpanel.canvas, 1, wx.ALL | wx.LEFT | wx.GROW , 5)
          self.mainpanel.SetSizer(self.mainpanel.sizer)
  
  
  app = wx.App(0)
  frame = MainFrame(None, title="My App")
  app.MainLoop()
  </code></pre>
  
  <p>The pyplot class in matplotlib provides a direct toolbar, i want to have a similar thing, but there i cannot customise that toolbar, </p>
  
  <p>So i want to know how can i set the x,y limits, pan the plot and box zoom the plot without using that toolbar.</p>
  
  <p>Thanks in advance</p>
  
  <p>PS. I am pretty much a newbie to python and GUI programming so please point any bad code practices i may have followed :P</p>