0

I would like to make a polar contour plot in matplot lib using the file below:

t1     theta1     r1
t2     theta2     r2
t3     theta3     r3
....
tN     thetaN     rN

The contour value should be the number of points for each mesh around some r and theta values (t values are time).

So my idea was to create a mesh ( like for every 0.1 radian and 5 radial units) and count the number of points for each part. I could write a loop to do the counting and then plot the resultant data. But I would like to know if there's any way that it can be done without counting the number of points for each individual mesh.

enter image description here

So basically I want this figure (plotted using plt.scatter) but instead of scatter, I want a contour plot.

Population Xplosive
  • 581
  • 2
  • 8
  • 18
  • 2
    I would assume [`numpy.histogram2d`](https://numpy.org/doc/stable/reference/generated/numpy.histogram2d.html) to do the job. See also a possibly related question [here](https://stackoverflow.com/questions/55064339/polar-histogram-in-python-for-given-r-theta-and-z-values). – Timo Oct 31 '20 at 12:55
  • Thanks, mate!! This was what I was looking for!! You're awesome! – Population Xplosive Oct 31 '20 at 15:40

0 Answers0