www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SpecifyNumberOfBinsForPolarHistogramChartExample.m

    %% Specify Number of Bins for Polar Histogram Chart
% Create a histogram plot from 100,000 values between $-\pi$ and $\pi$, and
% sort the data into 25 bins.

theta = atan2(rand(100000,1)-0.5,2*(rand(100000,1)-0.5));
polarhistogram(theta,25);