![Plotting the orientation of lines - 2019 07 10.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228456/Plotting%20the%20orientation%20of%20lines%20-%202019%2007%2010.png)
Plotting the orientation of lines
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Marmar
el 10 de Jul. de 2019
Comentada: Star Strider
el 10 de Jul. de 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228444/rose.jpeg)
0 comentarios
Respuesta aceptada
Star Strider
el 10 de Jul. de 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228456/Plotting%20the%20orientation%20of%20lines%20-%202019%2007%2010.png)
2 comentarios
Más respuestas (1)
Guillaume
el 10 de Jul. de 2019
Editada: Guillaume
el 10 de Jul. de 2019
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');
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!