Circular time plots using polarhistogram?

6 ビュー (過去 30 日間)
Sadegh Rahimi
Sadegh Rahimi 2023 年 2 月 17 日
コメント済み: William Rose 2023 年 3 月 1 日
Hi there,
I don't know how to make circular plots in Matlab. They can provide insight into patterns of activity based on time of day and are frequently used in research articles (like the attached figure). Is it possible to use polarhistogram to draw it? Thanks for your comments and suggestions!

採用された回答

William Rose
William Rose 2023 年 3 月 1 日
Suppose you have the wind direction in degrees at 1 minute intervals for 1 day:
windDir=360*rand(1,1440);
Make a histogram of the wind:
polarhistogram(windDir)
Maybe you don;t like that histogram because the degrees do not look like a compass. Suppose also that you want the histogram to have 15 degree segments (pi/12) instead of 30 degrees. Make those fixes as follows::
figure; polarhistogram(windDir, 'BinWidth',pi/12)
set(gca,'ThetaZeroLocation','top','ThetaDir','clockwise');
Good luck!
  3 件のコメント
Sadegh Rahimi
Sadegh Rahimi 2023 年 3 月 1 日
Truely nice, thank you very much
William Rose
William Rose 2023 年 3 月 1 日
@Sadegh Rahimi, you're welcome.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by