how to add titles row wise in the montage ?

조회 수: 29 (최근 30일)
hp
hp 2021년 4월 6일
편집: darova 2021년 5월 22일
I have multiple image categories.. how to display row wise title in the montage function while displaying the images ..
if its not possible by montage how to display row wise titles using subplot for multiple image categories .. as in reference image attached here
  댓글 수: 1
Adam Danz
Adam Danz 2021년 4월 6일
편집: Adam Danz 2021년 4월 6일
I don't think that example image uses montage().
It probably just uses subplot() or, tiledlayout.
Also note that each row has an odd number of images which makes it easy to center a title by merely assigning it to the middle image in each row.

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

채택된 답변

darova
darova 2021년 4월 6일
What about text function?
load mri
montage(D, map)
text(500,25,'TITLE 1','fontsize',30,'color','yellow','fontweight','bold')
text(500,200,'TITLE 2','fontsize',30,'color','yellow','fontweight','bold')
  댓글 수: 4
darova
darova 2021년 4월 7일
Please learn to use code button
hp
hp 2021년 4월 22일
Thank you for the information . Next time surely i will use Code box to write the code..

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

추가 답변 (1개)

hp
hp 2021년 4월 26일
to display title at the left side of the montage we can use index in negative values
montage(img(),'size',[10,10])
%-----------------------------------------------------
%Display title on each row of montage
offset=0;
for i=1:numel(Qclass)
text(-120,0+offset,Qclass(i),'fontsize',10,'color','blue','fontweight','bold') %works perfectly
offset=offset+55;
end
  댓글 수: 1
Adam Danz
Adam Danz 2021년 4월 26일
편집: Adam Danz 2021년 4월 26일
Wouldn't it be cleaned and easier to use ytick labels instead?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by