Normalizing a polar histogram

조회 수: 10 (최근 30일)
Denis Wolff
Denis Wolff 2017년 5월 16일
댓글: Denis Wolff 2017년 5월 17일
Hello,
I have two groups with distributions of phase angles which I want to plot in two seperate polar histograms, using the matlab function 'polarhistogram' (2017a). Moreover, I want to normalize the histograms by the number of observations across both groups. Normalizing each histogram by the number of observations in each group seperately is straightforward by inputting 'normalization', 'probability'. But although it sounds simple, I have found no way yet of normalizing each polar plot by the total number of observations.
For normal histograms I know a trick for this (there one can use the output of 'hist' first, change it, and input it into 'bar'), however this does not work for this function.
I would be happy if anyone can suggest a solution for it.

채택된 답변

Steven Lord
Steven Lord 2017년 5월 16일
I haven't tried this, but if I understand what you're trying to do I believe it will work.
  1. Bin the data yourself (using the same set of edges) using two calls to histcounts.
  2. Normalize each set of bins using the combined data from both sets of bins.
  3. Specify the 'BinEdges' and 'BinCounts' inputs in two calls to polarhistogram with a different polaraxes for each, one call per set of data.
  댓글 수: 1
Denis Wolff
Denis Wolff 2017년 5월 17일
Thanks very much, it works :-)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Distribution Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by