title: axis range in scatter graphs
body: <p>I have been using the code below to plot the time spent to run 4 functions. The x axis represents the number of executions whereas the y axis represents the time spent 
  running a function. </p>
  
  <p>I was wondering if you could help me accomplish the following:</p>
  
  <p>1) set the limits of the x axis so that only positive values are shown (x represents
  the number of times each function was executed and is, therefore, always positive)</p>
  
  <p>2) create a legend for the 4 functions</p>
  
  <p>Thank you,</p>
  
  <p>Mark</p>
  
  <pre><code>import matplotlib
  from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
  from matplotlib.figure import Figure
  import matplotlib.mlab as mlab
  
  
  r = mlab.csv2rec('performance.csv')
  
  fig = Figure(figsize=(9,6))
  
  canvas = FigureCanvas(fig)
  
  ax = fig.add_subplot(111)
  
  ax.set_title("Function performance",fontsize=14)
  
  ax.set_xlabel("code executions",fontsize=12)
  
  ax.set_ylabel("time(s)",fontsize=12)
  
  ax.grid(True,linestyle='-',color='0.75')
  
  ax.scatter(r.run,r.function1,s=10,color='tomato');
  ax.scatter(r.run,r.function2,s=10,color='violet');
  ax.scatter(r.run,r.function3,s=10,color='blue');
  ax.scatter(r.run,r.function4,s=10,color='green');
  
  canvas.print_figure('performance.png',dpi=700)
  </code></pre>