labelling issue in graph plotting

2 Ansichten (letzte 30 Tage)
yogeshwari patel
yogeshwari patel am 21 Dez. 2024
Beantwortet: Suraj Kumar am 21 Dez. 2024
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

Antworten (1)

Suraj Kumar
Suraj Kumar am 21 Dez. 2024
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!

Kategorien

Mehr zu Labels and Styling finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by