labelling issue in graph plotting

1 回表示 (過去 30 日間)
yogeshwari patel
yogeshwari patel 2024 年 12 月 21 日
回答済み: Suraj Kumar 2024 年 12 月 21 日
plot(r,v1_lower,r,v1_upper,'LineWidth',4)
xlabel('r')
ylabel('\widetilde\nu_1(\chi ,\tau ;r )')
%subplot(2,2,2)
plot(r,v2_lower,r,v2_upper,'LineWidth',4)
xlabel('r')
ylabel('\widetilde\nu_2(\chi ,\tau ;r )')
%subplot(2,2,3)
plot(r,v3_lower,r,v3_upper,'LineWidth',4)
xlabel('r')
ylabel('\widetilde\nu_3(\chi ,\tau ;r )')
Due to \widetilde the y axis is not displayed \widetilde\nu_3(\chi ,\tau ;r ) the notation are not displayed

回答 (1 件)

Suraj Kumar
Suraj Kumar 2024 年 12 月 21 日
I understand the issue that you are encountering here in labeling the y-axis in the MATLAB plots.
The issue is that LaTeX commands like '\widetilde' weren't enclosed in dollar signs ($) and MATLAB wasn't set to interpret labels with LaTeX.
You can refer to the below mentioned code snippet and the attached output for better understanding:
plot(r, v1_lower, r, v1_upper, 'LineWidth', 2);
xlabel('r');
ylabel('$\widetilde{\nu}_1(\chi ,\tau ;r )$', 'Interpreter', 'latex');
title('Plot of $\widetilde{\nu}_1$', 'Interpreter', 'latex');
legend('Lower', 'Upper');
Output:
To learn more about using LaTex to format titles and axis labels, you can refer to the following documentation:
Hope this helps!

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by