how to add titles row wise in the montage ?

27 vues (au cours des 30 derniers jours)
hp
hp le 6 Avr 2021
Modifié(e) : darova le 22 Mai 2021
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 commentaire
Adam Danz
Adam Danz le 6 Avr 2021
Modifié(e) : Adam Danz le 6 Avr 2021
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.

Connectez-vous pour commenter.

Réponse acceptée

darova
darova le 6 Avr 2021
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 commentaires
darova
darova le 7 Avr 2021
Please learn to use code button
hp
hp le 22 Avr 2021
Thank you for the information . Next time surely i will use Code box to write the code..

Connectez-vous pour commenter.

Plus de réponses (1)

hp
hp le 26 Avr 2021
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 commentaire
Adam Danz
Adam Danz le 26 Avr 2021
Modifié(e) : Adam Danz le 26 Avr 2021
Wouldn't it be cleaned and easier to use ytick labels instead?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Display Image dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by