How can I give degree symbol in XTicklabel in a bar graph?
4 ビュー (過去 30 日間)
古いコメントを表示
Md Zillur Rahman
2015 年 10 月 28 日
コメント済み: Md Zillur Rahman
2015 年 10 月 29 日

I used the following code in Matlab 2013b to give degree symbol in X-axis tick label.
set(gca,'XTicklabel',{'Neat PP';'0^{\circ}';'30^{\circ}';'45^{\circ}';'60^{\circ}';'90^{\circ}'})
It did not help me (please see attached figure). Can anyone please give me solution? Thank you.
0 件のコメント
採用された回答
Stalin Samuel
2015 年 10 月 28 日
set(gca,'XTicklabel',{'Neat PP'; [sprintf('0%c', char(176))];[sprintf('30%c', char(176))];[sprintf('45%c', char(176))];[sprintf('60%c', char(176))];[sprintf('90%c', char(176))]})
その他の回答 (1 件)
Stephen23
2015 年 10 月 28 日
編集済み: Stephen23
2015 年 10 月 28 日
Make sure that the axes' TickLabelInterpreter property is set to either tex or latex:
The documentation includes a list of the TEX symbols and commands that can be used in MATLAB: click on the arrow in the subheading to show the full list.
1 件のコメント
Steven Lord
2015 年 10 月 28 日
The TickLabelInterpreter property was introduced as part of the new graphics system in release R2014b. It is not available in release R2013b.
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!