Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8204377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T07:52:55+00:00 2026-06-07T07:52:55+00:00

While plotting using Matplotlib, I have found how to change the font size of

  • 0

While plotting using Matplotlib, I have found how to change the font size of the labels.
But, how can I change the size of the numbers in the scale?

For clarity, suppose you plot x^2 from (x0,y0) = 0,0 to (x1,y1) = (20,20).
The scale in the x-axis below maybe something like

0 1 2 … 20.

I want to change the font size of such scale of the x-axis.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T07:52:58+00:00Added an answer on June 7, 2026 at 7:52 am

    Matplotlib refers to these as xtick labels. They can be changed in a large number of different ways, passed in as parameters, or iterated through and edited (as in the case of the solution posted here Matplotlib make tick labels font size smaller).

    I went ahead and posted a more concise solution, as the former was very inefficient.

    from matplotlib import pyplot
    import math
    
    def setLabelExample():
        fig = pyplot.figure() 
        x = [i for i in range(200)]
        y = [xi**2 for xi in x]
    
        ax = fig.add_subplot(1,1,1)
        ax.plot(x, y) 
        ax.tick_params(axis='x', labelsize=30)
        fig.suptitle('Matplotlib xticklabels Example')
        pyplot.show()
    
    if __name__ == '__main__':
        setLabelExample()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I suppress the display of a figure window while keeping the plotting
I have written a small webapp using the flask framework that involves plotting using
I am plotting some data using BY GROUP option. While I am able to
While deveoping a site (using Forms authentication and InProc sessionstate) a frequently run into
While developing an application using gwt in ecliplse crashed. Now the server is running
While playing with standard library i've found a strange difference between python2 and python3.
While refactoring my code base I found a piece of code which I'd like
I'd like to export plotting symbols from R as a png graphic. But I
I'm stuck trying to solve this. I'm plotting some information that I have in
I have a task, which I know how to code (in C#), but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.