Change circular histogram scale
Show older comments
Hi,
I plot couple of circular histograms using circ_plot from Circular Statistics Toolbox for Matlab ( http://www.jstatsoft.org/v31/i10) and I would like to set the same histogram scale for different plots. Is it possible?
Thanks
Answers (1)
Grzegorz Knor
on 6 Sep 2011
circ_plot uses standard matlab rose function. Unfortunatelly there is no 'rlim' (something like xlim) property. You can fix it by simple trick, just plot polar(0,rmax,'-k') before you use circ_plot, where rmax is something like 'rlim':
rmax = .1;
% Examples:
figure
polar(0,rmax,'-k')
hold on
alpha = randn(60,1)*360;
circ_plot(alpha,'hist',[],12,true,true)
hold off
figure
polar(0,rmax,'-k')
hold on
alpha = randn(120,1)*360;
circ_plot(alpha,'hist',[],20,true,true,'linewidth',2,'color','r')
hold off
figure
polar(0,rmax,'-k')
hold on
alpha = randn(160,1)*360;
circ_plot(alpha,'hist',[],20,true,true,'linewidth',2,'color','r')
hold off
Categories
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!