how to set the figure title using corrplot() ?

조회 수: 20 (최근 30일)
Lucas Carey
Lucas Carey 2015년 6월 16일
편집: Adam Danz 2018년 12월 10일
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?
  댓글 수: 2
B.k Sumedha
B.k Sumedha 2015년 6월 16일
What have u tried so far?
Lucas Carey
Lucas Carey 2015년 6월 16일
title(), set(gcf , and set(gca

댓글을 달려면 로그인하십시오.

답변 (1개)

Adam Danz
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
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
Adam Danz
Adam Danz 2018년 12월 10일
I made a small adaptation to my original solution. All you really need is the handle to the figure which can be obtained by miicha's method, by using gcf(), or by creating the figure just prior to corrplot().

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Title에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by