How to include subscript in the variable name in Biplot
조회 수: 5 (최근 30일)
이전 댓글 표시
Hallo:
I am doing Principal component analysis and I need to add subscripts in my variable name while plotting Biplot.Below is the code I am using:
figure
biplot(coefs(:,1:2),'VarLabels',...
{'X_{1}' 'X_{2}' 'X_{3}' 'X_{4}''X_{5}' 'X_{6}' 'X_{7}' 'X_{8}''X_{9}' 'X_{10}' 'X_{11}' 'X_{12}'})
But names do not appear in the biplot. But interestingly, I tested with 6 variables instead of 12 and my code worked.
Please help
댓글 수: 0
답변 (1개)
arushi
2024년 8월 22일
Hi Khandker,
The issue you're facing with variable names not appearing in the biplot when using 12 variables could be due to a syntax error or plot size constraints.
Here's the corrected version of your code with proper syntax:
figure;
biplot(coefs(:,1:2), 'VarLabels', ...
{'X_{1}', 'X_{2}', 'X_{3}', 'X_{4}', 'X_{5}', 'X_{6}', ...
'X_{7}', 'X_{8}', 'X_{9}', 'X_{10}', 'X_{11}', 'X_{12}'});
Hope this helps.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!