![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/568504/image.png)
Add cartesian axes to polarscatter?
9 ビュー (過去 30 日間)
古いコメントを表示
Maximilian Freiberg
2021 年 3 月 26 日
コメント済み: Maximilian Freiberg
2021 年 4 月 1 日
Hi,
I would like to know if t's possible to add cartesian axes onto a polar scatter plot like in this picture.
Haven't found any solution for this problem.
Thank you very much!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/562866/image.png)
0 件のコメント
採用された回答
Pavan Guntha
2021 年 3 月 31 日
Hi Maximilian,
You could try the following workaround:
1) You could make use of axes and polaraxes commands and their properties to add to the same figure window as illustrated in the code below:
th = pi/6:pi/6:2*pi;
r1 = rand(12,1);
figure(1);
clf
xl = 'X (mm)';
yl = 'Y (mm)';
axes1 = axes("XLim", [-3 3], "YLim", [-3 3], "Box","on");
axes2 = polaraxes;
axes2.RLimMode = 'manual';
rlim(axes2, [0 0.5]);
hold on
polarscatter(axes2,th,r1,'filled')
r2 = rand(12,1);
polarscatter(axes2,th,r2,'filled')
hold off
axes2.Position = [0.165 0.165 0.7 0.7];
You could vary the Position and Units properties of polaraxes to place the polarplot at appropriate place on the figure. The plot for the above code is as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/568504/image.png)
Hope this helps!
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Polar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!