MATLAB Answers

How to change Variable names of corrplot

48 ビュー (過去 30 日間)
Yaser Khojah
Yaser Khojah 2019 年 9 月 25 日
コメント済み: Yaser Khojah 2019 年 10 月 3 日
I'm trying to change the variables names of a corrplot from the default one, but It is not working. Can you please help
VariableNames ={'G1','G4','G5','T1','T2','T5','ENPV'};
Matrix_cor = rand(20,7)
corrplot((Matrix_cor, VariableNames);

  0 件のコメント



Abhilash Padma
Abhilash Padma 2019 年 9 月 30 日
In the corrplot function, you should pass the name-value pair. Here you are passing only value but not name. You should use:
corrplot(Matrix_cor, 'varNames', VariableNames);

  1 件のコメント

Yaser Khojah
Yaser Khojah 2019 年 10 月 3 日
Thanks alot, it worked.


その他の回答 (0 件)


Community Treasure Hunt

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

Start Hunting!

Translated by