Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MATLAB Figure Title gets cut off

Tags:

image

matlab

When I use the following code to display an image, it displays fine, but the figure window is cropped close around the figure so that the title is cut off. It's definitely there though because if I manually make the window taller, then the title becomes visible.

I think this is my fault because a while back I was messing around with default settings for how MATLAB fits the window to the axis. Now I just can't remember the settings that changed this. Can anyone help? Thanks.

Code:

figure();
imshow(my_img);
title('A Sample Image');
like image 872
SSilk Avatar asked Jun 02 '11 17:06

SSilk


People also ask

How do you add a title to a figure in MATLAB?

Create Title and SubtitleCreate a plot. Then create a title and a subtitle by calling the title function with two character vectors as arguments. Use the 'Color' name-value pair argument to customize the color for both lines of text. Specify two return arguments to store the text objects for the title and subtitle.

How do I change the title size in MATLAB?

By default the FontSize property is 10 points and the TitleFontSizeMultiplier is 1.100 , which means that the title font size is 11 points. To change the title font size without affecting the rest of the font in the axes, set the TitleFontSizeMultiplier property of the axes.

How do I reset a figure property in MATLAB?

reset(h) resets all properties on the object identified by h to their default values. Properties that do not have default values are not affected. If h is a figure, then MATLAB® software does not reset Position , Units , WindowStyle , or PaperUnits .


1 Answers

OK, I found it. In R2010a, it can be fixed by going "File -> Preferences -> Image Processing" and under IMSHOW Display, setting Border Style to Loose. Don't know why I didn't notice this before. Thanks everyone.

like image 183
SSilk Avatar answered Sep 29 '22 17:09

SSilk