I have a two-variables function as
Z = m_1 m_2 / pow(m_1 + m_2, 2)
I want to plot the curves with constant values for Z in the m_1 - m_2 plane (contours). For example, Z=0.10, 0.15, 0.20, 0.25. 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.
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()


