5

This is my code:

from matplotlib import pyplot as plt

dec = pd.read_csv('POLAR.txt', sep="    ", header=None, skiprows=1)

ra = [0,30,60,90,120,150,180,210,240,270,300,330] 
ra = [x/180.0*np.pi for x in ra]

ax = plt.subplot(111, projection='polar')
plt.polar(ra, dec, 'ok')
plt.plot(ra,dec, data=ra , marker='o', color='olive', linewidth=2)
ax.set_yticklabels([]) 

I'm still not sure how to connect the last and first points though. This is what I get:

enter image description here

I'm wondering how can I connect the points with curved lines? And is there anyway to get the equation of this peanut shaped plot?

ImportanceOfBeingErnest
  • 321,279
  • 53
  • 665
  • 712
Physabz
  • 61
  • 4
  • I found the answer on this [other post](https://stackoverflow.com/questions/59493724/custom-spider-chart-display-curves-instead-of-lines-between-point-on-a-polar) ! – milembar Sep 11 '21 at 21:03

0 Answers0