フィルターのクリア

How can I change a colorbar title interpreter to latex?

162 ビュー (過去 30 日間)
Alex Friedlan
Alex Friedlan 2019 年 10 月 24 日
編集済み: Alex Friedlan 2019 年 10 月 24 日
I'm trying to add a title to my colorbar. The other labels in my plot are set to a specific font with the 'Interpereter', 'latex' option. How can I set the colorbar title to the same interperter?

採用された回答

Star Strider
Star Strider 2019 年 10 月 24 日
This seems to work (in R2019b):
surf(peaks)
c = colorbar;
c.Label.String = 'Elevation (ft in 1000s) $\frac{1}{2}$';
c.Label.Interpreter = 'latex';
(This appears to be a lucky guess on my part, otherwise taken from the colorbar documentation. I added the ‘$\frac{1}{2}$’ to be certain that it works.)
Also see the TickLabelInterpreter section of the colorbar documentation.
  2 件のコメント
Alex Friedlan
Alex Friedlan 2019 年 10 月 24 日
編集済み: Alex Friedlan 2019 年 10 月 24 日
Thanks for the reply. This solves the issue! I'd like to note that this also works for colorbar titles and not just colorbal labels.
Cheers!
Star Strider
Star Strider 2019 年 10 月 24 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by