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 416313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:28:05+00:00 2026-05-12T18:28:05+00:00

in matplotlib, how do i place ticks labels between ticks (not below ticks) for

  • 0

in matplotlib, how do i place ticks labels between ticks (not below ticks)

for example: when plotting a the stock price over time i would like the x axis minor ticks to display months and the years to show up between consecutive x axis major ticks (not just below the major ticks)

---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---
  jan feb mar apr may jun jul aug sep oct nov dec jan feb mar apr may jun jul aug sep
                       2008                                            2009
  • 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-05-12T18:28:05+00:00Added an answer on May 12, 2026 at 6:28 pm

    Will this do the trick?

    enter code here
    x = 'j f m a m j j a s o n d j f m a m j j a s o n d'.split()
    y = abs(randn(24))
    x[6] = 'j\n2008' # replace "j" (January) with ('j' and the appropriate year
    x[18] = 'j\n2009'
    bar(xrange(len(x)), y, width=0.1)
    bar(xrange(len(x)), y, width=0.1)
    xticks(xrange(len(x)), x, ha='center')
    

    Barchart with proper labels

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

Sidebar

Related Questions

I am using matplotlib in a django app and would like to directly return
I am currently using matplotlib.pyplot to create graphs and would like to have the
How would one go plotting a plane in matlab or matplotlib from a normal
I'm using matplotlib to plot data as a function of time in hh:mm:ss.ms format
If I use a Matplotlib DateFormatter, like this: mydateformatter = DateFormatter(%b %d %I:%M %p,
Using matplotlib, I define the following function to print labels. Labels are located at
I am using matplotlib and a modified version of this example to generate plots
In matplotlib, sometime the major-ticks are too close to each other in a loglog
I would like to write the radian units of the axes as proportional to
I use matplotlib to display a matrix of numbers as an image, attach labels

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.