フィルターのクリア

latex interpreter in Heatmap title

8 ビュー (過去 30 日間)
Bakhtyar Hoseinzadeh
Bakhtyar Hoseinzadeh 2018 年 10 月 22 日
回答済み: Benjamin Kraus 2023 年 9 月 20 日
Hi, in the following code, I want to use latex as the interpreter for Heatmap title. It priduces error and I was unable to find a solution in Matlab guide. M=zeros(5,5); Xax=1:5; Yax=1:5; h = heatmap(Xax,Yax,M); % set(h,'Interpreter','latex'); set(h,'defaulttextinterpreter','latex'); h.Interpreter='latex'; h.Title = 'Theta (Deg)'; % title=sprintf('%s%0.1f%s','Theta(Deg):P=',MP,' pu'); % h.Title=title; h.ColorLimits = [0 60]; map = [0 0 1; 0 1 0; 1 0 0]; h.MissingDataColor='w'; % r g b y m c w k h.XLabel = 'SCR'; h.YLabel = 'XoR'; h.Colormap=map; %summer jet parula cool spring white prism pink copper lines gray winter autumn hot hsv

回答 (2 件)

Bakhtyar Hoseinzadeh
Bakhtyar Hoseinzadeh 2018 年 10 月 22 日
Hi, what you have sent is for plot command not for Heatmap. It produces error.

Benjamin Kraus
Benjamin Kraus 2023 年 9 月 20 日
Starting in MATLAB R2023b, the HeatmapChart now has an Interpreter property.
M = zeros(5,5);
Xax = 1:5;
Yax = 1:5;
h = heatmap(Xax,Yax,M);
h.Interpreter='latex';
h.Title = '$\int_1^{20} x^2 dx$';

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by