How to auto rotate x/y/z-label to the same angle as the axis?
19 ビュー (過去 30 日間)
古いコメントを表示
I use the 'Rotation' option to get the text aligned with the axis at the momet, eg:
xlabel('Frequency (MHz)','Rotation',-10)
but it is a bit time consuming, especially when you rotate the figure back anf forth to get a nice wiev.
Surely there must be a way to automatically rotate the labels so that they align with the direction of the actual axis? Maybe not actively when rotating but atleast with a command when using "surfc" for example...
2 件のコメント
Jan
2017 年 11 月 27 日
What exactly is time consuming? Why "surfc"? How do you determine the value of the angle, -10 in your example?
回答 (1 件)
Rik
2017 年 11 月 27 日
You can get a handle to the 3d rotation, so if you determine the appropriate rotation (e.g. with the output of view), you can set the ActionPostCallback function.
h=rotate3d;
set(h,'ActionPostCallback',@myfunction);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!