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

  • SEARCH
  • Home
  • 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 8933759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:37:26+00:00 2026-06-15T09:37:26+00:00

Is there a simple way to make matplotlib not show the powers of ten

  • 0

Is there a simple way to make matplotlib not show the powers of ten in a log plot, and instead just show the numbers? I.e., instead of [10^1, 10^2, 10^3] display [10, 100, 1000]? I don’t want to change the tickmark locations, just want to get rid of the powers of ten.

This is what I currently have:
enter image description here

I can change the labels themselves via xticks, however I then get mismatching fonts or sizes for the y tick labels. I am using TeX for this text. I’ve tried the following:

xx, locs = xticks()
ll = [r'\rm{%s}' % str(a) for a in xx]
xticks(xx, ll)

This gives the following result:
enter image description here

In this particular case, I could use the same LaTeX roman font, but the sizes and looks are different to those in the y axis. Plus, if I used a different LaTeX font in matplotlib this is going to be problematic.

Is there a more flexible way of switching off the power of ten notation?

  • 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-15T09:37:26+00:00Added an answer on June 15, 2026 at 9:37 am

    Use a ScalarFormatter:

    from matplotlib import rc
    rc('text', usetex=True)
    rc('font', size=20)
    
    import matplotlib.pyplot as plt
    from matplotlib.ticker import ScalarFormatter
    
    fig = plt.figure(figsize=(10, 6))
    ax = fig.add_subplot(111)
    ax.semilogx(range(100))
    ax.xaxis.set_major_formatter(ScalarFormatter())
    plt.show()
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a simple plot below, is there a way to make matplotlib populate the
Is there a simple way to make Django render {{myform.name}} as John Smith instead
Is there a simple way to make sure that a local port is not
Is there a simple way to make an HTML page automatically adjust for mobile
Is there a simple way to make a fully square Button ? Normally, a
Is there a simple way to make a game loop in JavaScript? something like...
Is there a simple way to make a class object global for an entire
Is there a simple way to make Hibernate Search to index all its values
I have a string $str = recordsArray[]=3&recordsArray[]=1; Is there any simple way to make
Is there any simple way make count queries with Activate? What I'm doing today

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.