How to include subscript in the variable name in Biplot
5 views (last 30 days)
Show older comments
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 Comments
Answers (1)
arushi
on 22 Aug 2024
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 Comments
See Also
Categories
Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!