Forums

Font

Started by zohreh mohammadi September 11, 2009
Hi,

I want to know how I can change the font of my axis in plotting figure in MATLAB. The font of the title of my axis easly changes but the font of numbers in an axis doesn't change. I can change the font of my axis in property editor after plotting the figure. but I want to know a way for changing the fonts befor plotting my figure. actually, I search for a command for writtng in M-file and having my favorite fonts in the numbers of my axis.

Regards.
Hi

for solve this problem first you need to type this code :

% Create figure
figure1 = figure;

% Create axes
axes('Parent',figure1,'FontSize',14);

(in this code the size of font of axis is 14 !!)
then, you can plot any figures in Matlab, for example :

t=0:pi/40:2*pi;
plot(t,sin(t))

Regards
--- On Wed, 9/9/09, zohreh mohammadi wrote:

From: zohreh mohammadi
Subject: [matlab] Font
To: m...
Date: Wednesday, September 9, 2009, 11:04 AM



Hi,

I want to know how I can change the font of my axis in plotting figure in MATLAB. The font of the title of my axis easly changes but the font of numbers in an axis doesn't change. I can change the font of my axis in property editor after plotting the figure. but I want to know a way for changing the fonts befor plotting my figure. actually, I search for a command for writtng in M-file and having my favorite fonts in the numbers of my axis.

Regards.
Hi Zohreh,

You'll probably need to do something like....

x=xlabel('Temperature (degress C)');
set(x,'fontname','Times New Roman');

cheers,
Ibra

--- On Tue, 9/8/09, zohreh mohammadi wrote:

From: zohreh mohammadi
Subject: [matlab] Font
To: m...
Date: Tuesday, September 8, 2009, 11:34 PM



Hi,

I want to know how I can change the font of my axis in plotting figure in MATLAB. The font of the title of my axis easly changes but the font of numbers in an axis doesn't change. I can change the font of my axis in property editor after plotting the figure. but I want to know a way for changing the fonts befor plotting my figure. actually, I search for a command for writtng in M-file and having my favorite fonts in the numbers of my axis.

Regards.