Plotting Circles in Python (Maths)
1. Codes for plotting Circle
import numpy as np
import matplotlib.pyplot as plt
#------Following is a plot Showing Circle----#
gamma = np.linspace( 0 , 2 * np.pi , 200 )
radius = 0.5
a = radius * np.cos( gamma )
b = radius * np.sin( gamma )
figure, axes = plt.subplots(1)
axes.plot( a, b )
axes.set_aspect( 1 )
plt.title( 'Circles with Center in Origin' )
plt.show()
2. Codes for plotting Concentric Circle
import numpy as np
import matplotlib.pyplot as plt
#------Following is a plot Showing Concentric Circles----#
gamma = np.linspace( 0 , 2 * np.pi , 200 )
radius = 0.5
a = radius * np.cos( gamma )
b = radius * np.sin( gamma )
figure, axes = plt.subplots(1)
plt.scatter( 0 , 0 , s = 8000 )
plt.xlim( -0.65 , 0.65 )
plt.ylim( -0.75 , 0.75 )
axes.plot( a, b )
axes.set_aspect( 1 )
plt.title( 'Concentric Circles' )
plt.show()
Output Plot (1) and (2)