Combining diacritic marks in ylabel displayed incorrectly?

4 ビュー (過去 30 日間)
Oliver Grossmann
Oliver Grossmann 2023 年 10 月 10 日
コメント済み: Walter Roberson 2023 年 10 月 19 日
Hi, I'm trying to label my y-axis with a V-dot.
The command
ylabel('$\dot{V}$','Interpreter','latex');
works, but I'd prefer a consistent layout to my other graphics, all of which use the tex interpreter (resulting in a different font).
Thus, I tried the approach given in this answer, utilizing the unicode mark "combining dot above" which works great for the x-axis, but fails for the y-axis:
xlabel([double('V') 775 '(x)'],'Interpreter','tex')
ylabel([double('V') 775 '(x)'],'Interpreter','tex')
It seems the combining diacritic is placed at the wrong position (relative to the V character). This effect is found for the ylabel regardless of the combining diacritic mark used (might be easier to see with "combining diaeresis", decimal 776).
Any ideas as to why this is or a workaround to fix it?
  3 件のコメント
Oliver Grossmann
Oliver Grossmann 2023 年 10 月 10 日
Rotating the ylabel works;
yl = ylabel([double('V') 775 '(x)'],'Interpreter','tex');
yl.Rotation = 0;
but I want/need to have the label in the vertical orientation.
So far, my best solution is to manually add the dot-above in paint afterwards...
Dyuman Joshi
Dyuman Joshi 2023 年 10 月 10 日
Using text objects on top of labels has the same problem.

サインインしてコメントする。

採用された回答

Ayush Anand
Ayush Anand 2023 年 10 月 19 日
編集済み: Ayush Anand 2023 年 10 月 19 日
Hi Oliver,
I understand you are trying to use a diacritical character and add a dot on top of "V" on your y-label in a vertical orientation, with the "tex" interpreter. This feature, however, is not supported in MATLAB as of now. The answer below states that combining diacritics doesn't work if the text's rotation is not 0 degrees(horizontal) for the tex interpreter:
The only workaround as of now seems to be either use Latex, as you mentioned, or keep the text alignment as horizontal.
I hope this helps!
  1 件のコメント
Walter Roberson
Walter Roberson 2023 年 10 月 19 日
MATLAB does not appear to support the fundamental TeX primitive \over
https://www.tug.org/utilities/plain/cseq.html#over-rp

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLabels and Annotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by