compass axis labels

6 ビュー (過去 30 日間)
muhammad tariq
muhammad tariq 2011 年 8 月 21 日
回答済み: Abby Skofield 2024 年 10 月 4 日
Hi,
Anyone know a way to change the default axis labels in a compass plot from the default (0,30,60,90,120,150,180...) to user-defined ones (90,60,30,0,-30,-60,-90) respectively?
I can't seem to figure out how to get at them!

採用された回答

Paulo Silva
Paulo Silva 2011 年 8 月 21 日
  1 件のコメント
muhammad tariq
muhammad tariq 2011 年 8 月 21 日
thanks paulo....got it

サインインしてコメントする。

その他の回答 (1 件)

Abby Skofield
Abby Skofield 2024 年 10 月 4 日
Starting in R2024b, the compassplot function can be used in place of compass to create arrows eminating from the origin of a polar axes. The PolarAxes class has many properties and several functions you can use to customize its appearance, including the tick values as requested here. Note that compassplot can be combined in a PolarAxes with other plots like polarhistogram, polarplot, polarscatter, etc.
t = linspace(-pi/2,pi/2,10);
compassplot(t,abs(sin(t))); % new in R2024b
% Adjust theta limits and ticks to span -90 to 90
thetalim([-90 90])
thetaticks([-90 -45 0 45 90])
You can also use the thetaticklabels function to specify custom label values if desired.

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by