size of axis numbers (2024)

1,029 views (last 30 days)

Show older comments

Hellho everyone. Do you know how to change the size of axis numbers in a figure in matlab?

0 Comments

Show -2 older commentsHide -2 older comments

Sign in to comment.

Answers (3)

size of axis numbers (2)

Sulaymon Eshkabilov on 19 May 2021

1 Comment

Show -1 older commentsHide -1 older comments

Sign in to comment.

size of axis numbers (4)

Jan on 18 May 2021

Edited: Jan on 18 May 2021

Do you mean the tick labels?

axes('FontSize', 24, 'NextPlot', 'add');

Without setting the NextPlot property, a plot() command will reset the size - maybe, I cannot try it currently.

size of axis numbers (6)

Jonas on 18 May 2021

if you are talking about the font size of the tick labels have a look into https://de.mathworks.com/matlabcentral/answers/173658-how-can-i-change-the-font-size-of-plot-tick-labels

2 Comments

Show NoneHide None

size of axis numbers (8)

Sulaymon Eshkabilov on 26 Jan 2023

Here are a couple of different ways to change axis font size.

x = linspace(-2*pi, 2*pi);

y = cos(x);

plot(x,y);

set(gca,'FontSize',20, 'FontName', 'Courier')

xlabel('x(t)') % Font Size and Name are taken from Line 4 command

ylabel('Y', 'FontSize', 15, 'FontName','Garamound', 'FontWeight','bold')

title("Font Size Change")

%% Alternative way:

fontsize(gca, 13, 'points')

fontname(gca, "SansSerif")

%% Alternative Way:

xlabel('x', 'FontName','Garamond', 'FontSize',10)

%% Axis and Font Color change options

ax = gca;

ax.YColor = 'r';

ax.XColor = 'm';

size of axis numbers (9)

Sign in to comment.

See Also

Tags

Community Treasure Hunt

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

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.


size of axis numbers (10)

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

Americas

Europe

Asia Pacific

Contact your local office

size of axis numbers (2024)
Top Articles
Latest Posts
Article information

Author: Rob Wisoky

Last Updated:

Views: 6291

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Rob Wisoky

Birthday: 1994-09-30

Address: 5789 Michel Vista, West Domenic, OR 80464-9452

Phone: +97313824072371

Job: Education Orchestrator

Hobby: Lockpicking, Crocheting, Baton twirling, Video gaming, Jogging, Whittling, Model building

Introduction: My name is Rob Wisoky, I am a smiling, helpful, encouraging, zealous, energetic, faithful, fantastic person who loves writing and wants to share my knowledge and understanding with you.