compass plot

16 ビュー (過去 30 日間)
nur
nur 2011 年 10 月 12 日
回答済み: Abby Skofield 2024 年 10 月 4 日
i would like to know how to rotate the compass so that 0 value is on the top (y-axis).when im plotting compass 0 value is on the right(x-axis).i want to make 0 value on y-axis.

採用された回答

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 (introduced in R2016a) has many properties and several functions you can use to customize its appearance. Note that compassplot can be combined in a PolarAxes with other plots like polarhistogram, polarplot, polarscatter, etc.
t = linspace(pi/3,2*pi,10);
cp = compassplot(t,sin(t)); % new in R2024b
pax = gca % get a handle to the PolarAxes
pax =
PolarAxes with properties: ThetaLim: [0 360] RLim: [0 1] ThetaAxisUnits: 'degrees' ThetaDir: 'counterclockwise' ThetaZeroLocation: 'right' Use GET to show all properties
pax.ThetaZeroLocation = "top";

その他の回答 (2 件)

Grzegorz Knor
Grzegorz Knor 2011 年 10 月 12 日
  1 件のコメント
Miguel Gil Mast
Miguel Gil Mast 2016 年 3 月 15 日
編集済み: Miguel Gil Mast 2016 年 3 月 15 日
Adding to Grzegorz Knor's comment, I used the following to rotate my compass (see attached pictures)
view([+90 -90]);
This is what Bruce Raine's script does also only that he saves the inputs as az and el first

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


Bruce Raine
Bruce Raine 2012 年 2 月 8 日
Try this code, the above code has the signs around the wrong way.
az = 90; % azimuth i.e. rotate around z-axis horizontally by 90 degrees
el = -90; % elevation negative, effectively looking beneath plot
view(az, el);

カテゴリ

Help Center および File Exchange3-D Scene Control についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by