# Polar histogram and bins

I have a list of polar coordinate points:

list = Transpose[Join[RandomReal[{1, 60}, {1, 100}], RandomReal[{0, 2 Pi}, {1, 100}]]]

I need to divide the circle into 16 angle sectors (Range[0, 2 Pi, 2 Pi/16]) and 4 radius sectors (Range[0, 100, 25]). I need to count the number of points that fallen into each two-component sector (there are $16\times4 = 64$ such two-component sectors).

BinCounts[list, {0, 100, 25}, {0, 2π, π/8}] //MatrixForm


$\left( \begin{array}{cccccccccccccccc} 4 & 2 & 1 & 2 & 2 & 3 & 4 & 2 & 4 & 0 & 1 & 4 & 2 & 2 & 1 & 3 \\ 4 & 3 & 2 & 3 & 3 & 0 & 3 & 2 & 4 & 2 & 2 & 0 & 3 & 4 & 1 & 4 \\ 2 & 1 & 1 & 0 & 3 & 2 & 1 & 3 & 3 & 0 & 1 & 3 & 0 & 3 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{array} \right)$

• this solution is not complete! It gives jut 16 sectors Commented Jan 9, 2016 at 2:19
list = Transpose[{RandomReal[{1, 60}, 100], RandomReal[{0, 2 Pi}, 100]}];

BinCounts[#[[All, 2]], {0, 2 Pi, 2 Pi/16}] & /@ Partition[list, 25] // MatrixForm


also:

HistogramList[list, {{0, 60, 15}, {0, 2 Pi, Pi/8}}][[2]]


reading again, the r bin should be {0,100,25}. The last bin will of course be empty since your random data ends at 60