How to change text interpreter of HeatmapChart?
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dominik Mattioli
am 21 Jul. 2021
Beantwortet: Benjamin Kraus
am 20 Sep. 2023
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 Kommentare
Akzeptierte Antwort
Benjamin Kraus
am 20 Sep. 2023
h = heatmap([1 3 5; 2 4 6]);
h.Title = '$x^y$';
h.Interpreter = 'latex';
0 Kommentare
Weitere Antworten (1)
Walter Roberson
am 21 Jul. 2021
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 Kommentare
Walter Roberson
am 18 Aug. 2022
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.
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!