Plotting the orientation of lines

조회 수: 9 (최근 30일)
Marmar
Marmar 2019년 7월 10일
댓글: Star Strider 2019년 7월 10일
Hi All,
I havea vector that contains orientaiton of rivers in an area, I want to show it in a plot like a rose plot (like a wind rose, but I just have orientaiton). The data range in degrees is form zero to 178. I used "rose" funciton in matlab, but seems it just gives the distribution of the data! because data are all over the circle! Any idea that I can show the orientaiton of the rivers in my study area in a plot (pereferably rose plot with zero as North) will be greratly appreciated!
Here is a part of data and the result using rose function in Matlab!
A=99.1862290400000
102.281400300000
97.1587243900000
97.3460346000000
104.227574300000
88.7849901300000
24.4667641000000
94.9823140300000
118.183307900000
94.1097181600000
97.1967073000000
150.312991700000
139.797621500000
rose.jpg

채택된 답변

Star Strider
Star Strider 2019년 7월 10일
Try this:
A = [99.1862290400000
102.281400300000
97.1587243900000
97.3460346000000
104.227574300000
88.7849901300000
24.4667641000000
94.9823140300000
118.183307900000
94.1097181600000
97.1967073000000
150.312991700000
139.797621500000];
figure
polarplot([A, A]'*pi/180, [zeros(size(A)), ones(size(A))]');
set(gca, 'ThetaZeroLocation','top', 'ThetaDir','clockwise')
Plotting the orientation of lines - 2019 07 10.png
  댓글 수: 2
Marmar
Marmar 2019년 7월 10일
Thanks a lot!
Star Strider
Star Strider 2019년 7월 10일
As always, my pleasure!

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

추가 답변 (1개)

Guillaume
Guillaume 2019년 7월 10일
편집: Guillaume 2019년 7월 10일
Not entirely sure what you're after, is it something like:
A = [99.1862290400000
102.281400300000
97.1587243900000
97.3460346000000
104.227574300000
88.7849901300000
24.4667641000000
94.9823140300000
118.183307900000
94.1097181600000
97.1967073000000
150.312991700000
139.797621500000]; %demo data
Arad = deg2rad(A);
polarplot([Arad, Arad]', repmat([0; 1], 1, numel(A)));
set(gca, 'ThetaZeroLocation', 'top');
  댓글 수: 1
Marmar
Marmar 2019년 7월 10일
Thanks for your reply! Somehow, but how can I convert it in such a way that while zero is north and east would be 90 and west 270?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by