Figure title/labels in LaTex cutoff
13 ビュー (過去 30 日間)
古いコメントを表示
Hi. If you run a code like title('$$\frac{1}{2}$$','interpreter','latex','fontsize',20) Matlab will set the title '1/2' on a figure window, neatly written in LaTex. However, the estimated size of this text is smaller than it really is, so the upper most part is cut off from the figure (hidden underneath the menubar)
I've tried to come up with a general solution using position, outerposition, extent, etc... But I haven't had any luck. The same is the case for x- & ylabels, written with LaTex.
Anyone out there who has a solution, or is up for the challenge to find one? Thank you!
0 件のコメント
回答 (4 件)
jay
2012 年 4 月 27 日
I found this suggestion from http://automatica.dei.unipd.it/tl_files/utenti/varagnolo/matlab/HowToMakePrettyFiguresWithMatlab.pdf
% in order to make matlab to do not "cut" latex-interpreted axes labels %
set(gca, ’Units’,’normalized’, ’Position’,[0.15 0.2 0.75 0.7]);
Then play around with the values in 'Position' until the frame looks right.
2 件のコメント
Daniel
2020 年 10 月 15 日
Apparently, this won't work in TiledLayout: "Setting this property has no effect when the parent container is a TiledChartLayout."
Any other solutions? My colorbar label is being cut off.
Fangjun Jiang
2011 年 3 月 7 日
what if you adjust the font size? title('$$\frac{1}{2}$$','interpreter','latex','fontsize',10) looks acceptable to me when the figure is in its default window size.
title('$$\frac{1}{2}$$','interpreter','latex','fontsize',20) looks good when the figure window is in full screen.
Germán
2011 年 5 月 17 日
I also get the same issue with the Tex interpreter, it usually cuts the \rangle or \langle character in ylabel or xlabel depending the font size.
0 件のコメント
Peter
2012 年 3 月 22 日
編集済み: Walter Roberson
2017 年 11 月 15 日
xlabel('time $t$','Interpreter','latex');
fig('units','centimeters','width',14,'height',4,'font','Helvetica','fontsize',16)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Labels and Annotations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!