How can I use pcolor for rings ?
古いコメントを表示
Hello,
I am trying to highlight a correlation between the position of earthquakes and some parameters such as depth or magnitude... I have already divided the map according to a grid. Then I get this correlation for each small square of the grid. </matlabcentral/answers/uploaded_files/29722/Capture%20d%E2%80%99%C3%A9cran%202015-04-24%20%C3%A0%2023.45.01.png>
Up to now, I succeeded to correlate the positions to the parameters, be it in cartesian or in polar coordinates.

Yet, I would like to correlate the mean depth of earthquakes to their positions according to the RADIUS (and only the radius, NOT the angle).
In other words, I would like to work with rings. (like the following figure)

Thank you very much for your help.
採用された回答
その他の回答 (1 件)
Ahmet Cecen
2015 年 4 月 25 日
I am not sure what the question here is. If all you need to check is whether there is a correlation between mean depth and radius, just convert your Cartesian coordinates to polar using:
[THETA,RHO] = cart2pol(X,Y)
then just do not use theta ... which is effectively
[~,RHO] = cart2pol(X,Y)
So then you would just plot RHO vs Mean Depth for a scatter plot, and do any sort of correlation analysis you want with RHO as your x and Mean Depth as your y.
If then you want to plot it, you will plot using:
polar(theta,rho)
but instead use:
polar(1:2*pi,rho)
so you will plot rings instead of points.
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Polar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
