polarscatter point color stroke that changes according to the value of the point

2 ビュー (過去 30 日間)
Alexi
Alexi 2023 年 1 月 9 日
回答済み: DGM 2023 年 1 月 9 日
I can create a point on the desired angle and radius with the following command, but I want to assign a color distribution (for example red to blue) according to the size of the values ​​of these points, how can I do it?
Thank you ..
th = linspace(0,2*pi,20);
r = rand(1,20);
sz = 75;
polarscatter(th,r,sz,'filled')

採用された回答

DGM
DGM 2023 年 1 月 9 日
What is the size of the value at the given points?
If you have that, you can use that for mapping the color as described in the documentation. Specifically, see the ways in which to set c.
Here, I'm just going to assume that c corresponds to r.
th = linspace(0,2*pi,100);
r = rand(1,100);
sz = 75;
polarscatter(th,r,sz,r,'filled')

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by