0
votes

I'm plotting several image subplots into one Matlab figure. (using imshow() and subplot(), respectively subaxis())

Using title() to describe the images consumes too much space in the figure.

Therefore, I would like to write a caption overlapping part of the image (something like legend() for function plots), but I can't find a corresponding function for that.

Is there some common way how to do that?

Thanks in advance!

2
If it is just a text label, you could use the function textradarhead

2 Answers

0
votes

Return a handle for the title and modify it:

figure(1)

handle=title('My Title');
set(handle,'Position',[0.5 0.9]);
1
votes

You can also use the text command to place text anywhere on the image, including OUTSIDE the axes.

plot([1 2 3 4])
xlim([1 4])
ylim([1 4])
text(mean(xlim), max(ylim)+0.05*diff(ylim), 'The title', 'horizontalAlignment', 'center')

You can edit other text properties as you would any other Matlab text object.