title: How can I plot implicit functions in python?
body: <p>I have a two-variables function as </p>
  
  <pre><code>Z = m_1 m_2 / pow(m_1 + m_2, 2)
  </code></pre>
  
  <p>I want to plot the curves with constant values for <code>Z</code> in the <code>m_1 - m_2</code> plane (contours). For example, <code>Z=0.10, 0.15, 0.20, 0.25</code>. What is the easiest way to do this job in python via matplotlib? Following is what I've tried but it doesn't quite what I want. I expect different results. I need to make sure if this is correct.</p>
  
  <pre><code>def etta(m_1, m_2):
      return m_1*m_2 / pow(m_1 + m_2, 2)
  
  m_1 = linspace(4, 14, 100)
  m_2 = linspace(4, 14, 100)
  
  X,Y = meshgrid(m_1, m_2)
  
  Z = etta(X, Y).T
  
  print(sqrt(2))
  
  fig, ax = plt.subplots()
  cnt = contour(Z, cmap=cm.RdBu)
  
  plt.show()
  </code></pre>