How to draw a circle without fill in matplotlib

Viewed 247

I have a question, which is probably a simple solution. I put down python for quite a few months and now I'm trying to create a few visuals, but I'm mind blanking on how to do it.

import matplotlib.pyplot as plt

circle1 = plt.Circle((0, 0), .5, color='r')

fig, ax = plt.subplots()

plt.xlim(-5,5)
plt.xlabel('AU')
plt.ylim(-5,5)
plt.ylabel('AU')

plt.grid(linestyle='-')

ax.set_aspect(1)

ax.add_artist(circle1)

plt.title('Habitable Zone Around the Sun ', fontsize=8)

plt.show()

This code gives me a fixed "sun" at my origin, and I'm trying to create an "earth orbit" at 1AU, as well as create a radial shell for the habitable zone for in inner and outer radius (say .8 AU and 1.2 AU). I'm probably overthinking this and am going to feel stupid after posting this.

1 Answers
Related