how to set the figure title using corrplot() ?
21 次查看(过去 30 天)
显示 更早的评论
the title in figures made using corrplot() is 'Correlation Matrix' and title() doesn't change this. How can I set the title in this figure?
回答(1 个)
Adam Danz
2018-10-3
编辑:Adam Danz
2018-12-10
I was also searching for a solution to this and didn't find one. So, here's the solution I came up with to change the title of a corrplot() plot.
fh = figure;
corrplot(...);
th = findall(fh, 'type', 'text', 'String', '{\bf Correlation Matrix}');
th.String = 'New Title';
[updated] fh is merely the handle to the figure hosting corrplot(). This now works with 2018b and older releases.
2 个评论
miicha
2018-12-10
In Matlab r2018b it will not work, since first output argument of corrplot is R not a handle and the handle you get is for the chart line objects...
[R,P,fh] = corrplot(...);
th = findall(fh(1).Parent.Parent, 'type', 'text', 'String', '{\bf Correlation Matrix}');
th.String = 'New Title';
With the above changes it'll work again
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Title 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!