Using Greek characters in heatmap

1 次查看(过去 30 天)
I am using heatmap and want to display x-axis in expressions of pi instead of numbers. Is there a way to do this. I tried xticklabels but it does not work with heatmap.
h = heatmap(phipt,ept,e1);
My x-axis
h.XVariable = {'0','\pi/4','\pi/2','3\pi/4','\pi'}

采纳的回答

Walter Roberson
Walter Roberson 2019-4-30
h.XDisplayLabels = {'0', '\pi/4', '\pi/2', '3\pi/4', '\pi'};
  2 个评论
Walter Roberson
Walter Roberson 2019-4-30
Before R2019a, you would also do
h.NodeChildren(3).XAxis.TickLabelInterpreter = 'tex';

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Distribution Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by