How to change text interpreter of HeatmapChart?
34 次查看(过去 30 天)
显示 更早的评论
The HeatmapChart() object takes over control of the XLabel, YLabel, Title, and TickLabels seemingly without letting you change the text interpreter. Is there an undocumented workaround or am I missing something?
figure;
h = heatmap([1 3 5; 2 4 6]);
h.Title = 'My Heatmap Title';
set( findall( gca,'-property','Interpreter' ),'Interpreter', 'Latex' ) % doesn't help
set( findall( gcf,'-property','Interpreter' ),'Interpreter', 'Latex' ) % doesn't help
set( groot, 'defaultAxesTickLabelInterpreter', 'LaTeX' ) % doesn't help
0 个评论
采纳的回答
Benjamin Kraus
2023-9-20
h = heatmap([1 3 5; 2 4 6]);
h.Title = '$x^y$';
h.Interpreter = 'latex';
0 个评论
更多回答(1 个)
Walter Roberson
2021-7-21
h = heatmap([1 3 5; 2 4 6]);
h.Title = '$x^y$';
h.NodeChildren(3).XAxis.TickLabelInterpreter = 'latex';
h.NodeChildren(3).YAxis.TickLabelInterpreter = 'latex';
h.NodeChildren(3).Title.Interpreter = 'latex';
2 个评论
Walter Roberson
2022-8-18
No, there does not appear to be any way to do that. Some of the details are hidden inside a .p so I cannot be absolutely certain, but all of the code I have found so far requires that the data be numeric.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Distribution Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!