How to plot ellipse in python
import numpy as np
import matplotlib.pyplot as plt
t = np.linspace(0,360,360)
x =10*np.cos(np.radians(t)) #10 is minor axis of ellipse
y = 50*np.sin(np.radians(t)) #50 is major axis of ellipse
plt.plot(x,y)
plt.show()
i prefer this one because i have mechanical engineering background
from numpy import *
from matplotlib.pyplot import *
t = linspace(0,360,360)
x = 10*cos(radians(t)) #10 is minor axis of ellipse
y = 50*sin(radians(t))#50 is major axis of ellipse
plot(x,y)
show()
output will be same for both
0 Comments
if you are not getting it then ask i am glad to help