import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d.axes3d import Axes3D
%matplotlib inline
fig = plt.figure(figsize=(16,12))
ax = fig.add_subplot(1, 1, 1, polar=True)
theta = np.linspace(-np.pi, np.pi, 1001)
r = np.sqrt(1 / (2 * np.cos(theta) ** 2 + 3 * np.sin(theta) ** 2 ))
ax.plot(theta, r, color='r', linewidth=3)
[<matplotlib.lines.Line2D at 0x10816bd90>]